Changeset 109168 in webkit
- Timestamp:
- Feb 28, 2012 4:27:41 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r109162 r109168 1 2012-02-28 Jonathan Backer <backer@chromium.org> 2 3 [chromium] Reset damage tracker on visibility change. 4 https://bugs.webkit.org/show_bug.cgi?id=79267 5 6 Reviewed by James Robinson. 7 8 Unit tests: CCLayerTreeHostImplTest.cpp 9 10 * platform/graphics/chromium/LayerRendererChromium.cpp: 11 (WebCore::LayerRendererChromium::setVisible): 12 1 13 2012-02-28 Sheriff Bot <webkit.review.bot@gmail.com> 2 14 -
trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
r108675 r109168 286 286 if (!visible) 287 287 releaseRenderSurfaceTextures(); 288 289 // TODO: Replace setVisibilityCHROMIUM with an extension to explicitly manage front/backbuffers 290 // crbug.com/116049 288 291 if (m_capabilities.usingSetVisibility) { 289 292 Extensions3DChromium* extensions3DChromium = static_cast<Extensions3DChromium*>(m_context->getExtensions()); 290 293 extensions3DChromium->setVisibilityCHROMIUM(visible); 294 295 // Reset the damage tracker because the front/back buffers may have been damaged by the GPU 296 // process on visibility change. 297 if (visible && m_capabilities.usingPartialSwap) 298 m_owner->setFullRootLayerDamage(); 291 299 } 292 300 } -
trunk/Source/WebKit/chromium/ChangeLog
r109155 r109168 1 2012-02-28 Jonathan Backer <backer@chromium.org> 2 3 [chromium] Reset damage tracker on visibility change. 4 https://bugs.webkit.org/show_bug.cgi?id=79267 5 6 Reviewed by James Robinson. 7 8 * tests/CCLayerTreeHostImplTest.cpp: 9 (WebKit::PartialSwapTrackerContext::getString): 10 (WebKit): 11 (WebKit::TEST_F): 12 1 13 2012-02-28 Tim Dresser <tdresser@chromium.org> 2 14 -
trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
r108941 r109168 746 746 { 747 747 if (name == GraphicsContext3D::EXTENSIONS) 748 return WebString("GL_CHROMIUM_post_sub_buffer ");748 return WebString("GL_CHROMIUM_post_sub_buffer GL_CHROMIUM_set_visibility"); 749 749 750 750 return WebString(); … … 823 823 } 824 824 825 // Make sure that we reset damage tracking on visibility change because the 826 // state of the front buffer that we push to with PostSubBuffer is undefined. 827 TEST_F(CCLayerTreeHostImplTest, visibilityChangeResetsDamage) 828 { 829 PartialSwapTrackerContext* partialSwapTracker = new PartialSwapTrackerContext(); 830 RefPtr<GraphicsContext3D> context = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(partialSwapTracker), GraphicsContext3D::RenderDirectlyToHostWindow); 831 832 // This test creates its own CCLayerTreeHostImpl, so 833 // that we can force partial swap enabled. 834 CCSettings settings; 835 settings.partialSwapEnabled = true; 836 OwnPtr<CCLayerTreeHostImpl> layerTreeHostImpl = CCLayerTreeHostImpl::create(settings, this); 837 layerTreeHostImpl->initializeLayerRenderer(context); 838 layerTreeHostImpl->setViewportSize(IntSize(500, 500)); 839 840 CCLayerImpl* root = new FakeDrawableCCLayerImpl(1); 841 root->setAnchorPoint(FloatPoint(0, 0)); 842 root->setBounds(IntSize(500, 500)); 843 root->setDrawsContent(true); 844 layerTreeHostImpl->setRootLayer(adoptPtr(root)); 845 846 // First frame: ignore. 847 layerTreeHostImpl->drawLayers(); 848 layerTreeHostImpl->swapBuffers(); 849 850 // Second frame: nothing has changed --- so we souldn't push anything with partial swap. 851 layerTreeHostImpl->drawLayers(); 852 layerTreeHostImpl->swapBuffers(); 853 EXPECT_TRUE(partialSwapTracker->partialSwapRect().isEmpty()); 854 855 // Third frame: visibility change --- so we should push a full frame with partial swap. 856 layerTreeHostImpl->setVisible(false); 857 layerTreeHostImpl->setVisible(true); 858 layerTreeHostImpl->drawLayers(); 859 layerTreeHostImpl->swapBuffers(); 860 IntRect actualSwapRect = partialSwapTracker->partialSwapRect(); 861 IntRect expectedSwapRect = IntRect(IntPoint::zero(), IntSize(500, 500)); 862 EXPECT_EQ(expectedSwapRect.x(), actualSwapRect.x()); 863 EXPECT_EQ(expectedSwapRect.y(), actualSwapRect.y()); 864 EXPECT_EQ(expectedSwapRect.width(), actualSwapRect.width()); 865 EXPECT_EQ(expectedSwapRect.height(), actualSwapRect.height()); 866 } 867 825 868 } // namespace
Note: See TracChangeset
for help on using the changeset viewer.