Diff
Modified: trunk/Source/WebCore/ChangeLog (100386 => 100387)
--- trunk/Source/WebCore/ChangeLog 2011-11-16 02:03:54 UTC (rev 100386)
+++ trunk/Source/WebCore/ChangeLog 2011-11-16 02:13:12 UTC (rev 100387)
@@ -1,3 +1,18 @@
+2011-11-15 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r100340.
+ http://trac.webkit.org/changeset/100340
+ https://bugs.webkit.org/show_bug.cgi?id=72448
+
+ Caused assertion failure in Win dbg canary. (Requested by
+ pkasting on #webkit).
+
+ * platform/graphics/chromium/LayerRendererChromium.cpp:
+ (WebCore::LayerRendererChromium::LayerRendererChromium):
+ (WebCore::LayerRendererChromium::viewportChanged):
+ (WebCore::LayerRendererChromium::drawLayersInternal):
+ * platform/graphics/chromium/LayerRendererChromium.h:
+
2011-11-15 Julien Chaffraix <[email protected]>
Switch table indexing to unsigned
Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (100386 => 100387)
--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp 2011-11-16 02:03:54 UTC (rev 100386)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp 2011-11-16 02:13:12 UTC (rev 100387)
@@ -174,7 +174,6 @@
, m_context(context)
, m_defaultRenderSurface(0)
, m_sharedGeometryQuad(FloatRect(-0.5f, -0.5f, 1.0f, 1.0f))
- , m_isViewportChanged(false)
{
}
@@ -276,7 +275,8 @@
void LayerRendererChromium::viewportChanged()
{
- m_isViewportChanged = true;
+ if (m_context)
+ m_context->reshape(std::max(1, viewportWidth()), std::max(1, viewportHeight()));
// Reset the current render surface to force an update of the viewport and
// projection matrix next time useRenderSurface is called.
@@ -352,14 +352,6 @@
return;
TRACE_EVENT("LayerRendererChromium::drawLayers", this, 0);
- if (m_isViewportChanged) {
- // Only reshape when we know we are going to draw. Otherwise, the reshape
- // can leave the window at the wrong size if we never draw and the proper
- // viewport size is never set.
- m_isViewportChanged = false;
- m_context->reshape(viewportWidth(), viewportHeight());
- }
-
CCLayerImpl* rootDrawLayer = rootLayer();
makeContextCurrent();
Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h (100386 => 100387)
--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h 2011-11-16 02:03:54 UTC (rev 100386)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h 2011-11-16 02:13:12 UTC (rev 100387)
@@ -231,8 +231,6 @@
CCLayerSorter m_layerSorter;
FloatQuad m_sharedGeometryQuad;
-
- bool m_isViewportChanged;
};
// Setting DEBUG_GL_CALLS to 1 will call glGetError() after almost every GL
Modified: trunk/Source/WebKit/chromium/ChangeLog (100386 => 100387)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-11-16 02:03:54 UTC (rev 100386)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-11-16 02:13:12 UTC (rev 100387)
@@ -1,3 +1,14 @@
+2011-11-15 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r100340.
+ http://trac.webkit.org/changeset/100340
+ https://bugs.webkit.org/show_bug.cgi?id=72448
+
+ Caused assertion failure in Win dbg canary. (Requested by
+ pkasting on #webkit).
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+
2011-11-15 Nat Duca <[email protected]>
[chromium] Fuse MainThread and CCThread
Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp (100386 => 100387)
--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp 2011-11-16 02:03:54 UTC (rev 100386)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp 2011-11-16 02:13:12 UTC (rev 100387)
@@ -292,45 +292,5 @@
EXPECT_TRUE(layer2->drawn());
}
-class ReshapeTrackerContext: public MockWebGraphicsContext3D {
-public:
- ReshapeTrackerContext() : m_reshapeCalled(false) { }
- virtual bool initialize(Attributes, WebView*, bool renderDirectlyToWebView) { return true; }
-
- virtual void reshape(int width, int height)
- {
- m_reshapeCalled = true;
- }
-
- bool reshapeCalled() const { return m_reshapeCalled; }
-
-private:
- bool m_reshapeCalled;
-};
-
-// Only reshape when we know we are going to draw. Otherwise, the reshape
-// can leave the window at the wrong size if we never draw and the proper
-// viewport size is never set.
-TEST_F(CCLayerTreeHostImplTest, reshapeNotCalledUntilDraw)
-{
- GraphicsContext3D::Attributes attrs;
- ReshapeTrackerContext* reshapeTracker = new ReshapeTrackerContext();
- RefPtr<GraphicsContext3D> context = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(reshapeTracker), attrs, 0, GraphicsContext3D::RenderDirectlyToHostWindow, GraphicsContext3DPrivate::ForUseOnThisThread);
- m_hostImpl->initializeLayerRenderer(context);
- m_hostImpl->setViewport(IntSize(10, 10));
-
- RefPtr<CCLayerImpl> root = CCLayerImpl::create(0);
- root->setAnchorPoint(FloatPoint(0, 0));
- root->setBounds(IntSize(10, 10));
- root->setDrawsContent(true);
- root->setBackgroundColor(Color(1, 1, 1, 1));
- m_hostImpl->setRootLayer(root);
- EXPECT_FALSE(reshapeTracker->reshapeCalled());
-
- m_hostImpl->drawLayers();
- EXPECT_TRUE(reshapeTracker->reshapeCalled());
-}
-
-
} // namespace