Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(802)

Issue 10690121: Merge 121076 - [chromium] LayerRendererChromium is not getting visibility messages in single thread… (Closed)

Created:
8 years, 5 months ago by danakj
Modified:
8 years, 5 months ago
Reviewers:
danakj
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Visibility:
Public.

Description

Merge 121076 - [chromium] LayerRendererChromium is not getting visibility messages in single threaded compositing mode. https://bugs.webkit.org/show_bug.cgi?id=89045 Reviewed by Adrienne Walker. Based on patch by Michal Mocny <mmocny@google.com>;. Source/WebCore: Invariants: 1.) We never commit (paint, animate, any of it) when not visible on the main thread -except- for compositeAndReadback, regardless of threaded vs non-threaded mode 2.) CCLayerTreeHost::m_contentsTextureManager's memory budget is only set by updateLayers() when we are going to make a frame and is always set to a non-zero value 3.) Zero-sized allocations from the GPU process are always serviced immediately on the impl thread. Non-zero allocations are met in the next frame, whenever we would produce that frame according to our usual frame scheduling logic. 4.) The impl thread always knows the set of currently-allocated managed texture IDs and can delete them all whenever it likes without needing the main thread to be responsive. Details: [See original commit...] * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChangedOnImpl): (WebCore::LayerRendererChromium::LayerRendererChromium): (WebCore::LayerRendererChromium::initialize): (WebCore::LayerRendererChromium::setVisible): (WebCore::LayerRendererChromium::setGpuMemoryAllocation): (WebCore): (WebCore::LayerRendererChromium::swapBuffers): (WebCore::LayerRendererChromium::getFramebufferPixels): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/TextureManager.cpp: (WebCore::TextureManager::evictAndRemoveAllDeletedTextures): (WebCore): * platform/graphics/chromium/TextureManager.h: (TextureAllocator): (TextureManager): * platform/graphics/chromium/TrackingTextureAllocator.cpp: (WebCore::TrackingTextureAllocator::createTexture): (WebCore::TrackingTextureAllocator::deleteTexture): (WebCore): (WebCore::TrackingTextureAllocator::deleteAllTextures): * platform/graphics/chromium/TrackingTextureAllocator.h: (TrackingTextureAllocator): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::CCLayerTreeHost): (WebCore::CCLayerTreeHost::initializeLayerRenderer): (WebCore::CCLayerTreeHost::finishCommitOnImplThread): (WebCore::CCLayerTreeHost::setVisible): (WebCore::CCLayerTreeHost::evictAllContentTextures): (WebCore::CCLayerTreeHost::updateLayers): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::commitComplete): (WebCore::CCLayerTreeHostImpl::canDraw): (WebCore::CCLayerTreeHostImpl::context): (WebCore::CCLayerTreeHostImpl::releaseContentsTextures): (WebCore): (WebCore::CCLayerTreeHostImpl::setMemoryAllocationLimitBytes): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImplClient): (WebCore::CCLayerTreeHostImpl::contentsTexturesWerePurgedSinceLastCommit): (WebCore::CCLayerTreeHostImpl::memoryAllocationLimitBytes): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): * platform/graphics/chromium/cc/CCRenderer.h: (CCRendererClient): * platform/graphics/chromium/cc/CCScheduler.cpp: (WebCore::CCScheduler::beginFrameComplete): (WebCore::CCScheduler::beginFrameAborted): (WebCore): (WebCore::CCScheduler::didSwapBuffersComplete): (WebCore::CCScheduler::didLoseContext): (WebCore::CCScheduler::didRecreateContext): (WebCore::CCScheduler::vsyncTick): * platform/graphics/chromium/cc/CCScheduler.h: (CCScheduler): * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp: (WebCore::CCSchedulerStateMachine::beginFrameAborted): (WebCore): * platform/graphics/chromium/cc/CCSchedulerStateMachine.h: * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::setVisible): (WebCore): (WebCore::CCSingleThreadProxy::stop): (WebCore::CCSingleThreadProxy::commitAndComposite): * platform/graphics/chromium/cc/CCSingleThreadProxy.h: (CCSingleThreadProxy): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::CCThreadProxy): (WebCore::CCThreadProxy::compositeAndReadback): (WebCore::CCThreadProxy::setVisible): (WebCore): (WebCore::CCThreadProxy::setVisibleOnImplThread): (WebCore::CCThreadProxy::scheduledActionBeginFrame): (WebCore::CCThreadProxy::beginFrame): (WebCore::CCThreadProxy::beginFrameAbortedOnImplThread): (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal): (WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread): * platform/graphics/chromium/cc/CCThreadProxy.h: (CCThreadProxy): (BeginFrameAndCommitState): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::willDraw): (WebCore::CCVideoLayerImpl::willDrawInternal): (WebCore::CCVideoLayerImpl::FramePlane::allocateData): (WebCore::CCVideoLayerImpl::FramePlane::freeData): (WebCore::CCVideoLayerImpl::allocatePlaneData): (WebCore::CCVideoLayerImpl::freePlaneData): (WebCore::CCVideoLayerImpl::freeUnusedPlaneData): (WebCore::CCVideoLayerImpl::didLoseContext): * platform/graphics/chromium/cc/CCVideoLayerImpl.h: (FramePlane): Source/WebKit/chromium: Update various test fixtures and tests to cover scheduling, visibility, and resource allocation changes. * tests/CCLayerTreeHostImplTest.cpp: * tests/CCLayerTreeHostTest.cpp: (CCLayerTreeHostTestAbortFrameWhenInvisible): (WTF::CCLayerTreeHostTestAbortFrameWhenInvisible::CCLayerTreeHostTestAbortFrameWhenInvisible): (WTF::CCLayerTreeHostTestAbortFrameWhenInvisible::beginTest): (WTF::CCLayerTreeHostTestAbortFrameWhenInvisible::afterTest): (WTF): (WTF::TEST_F): (WTF::CCLayerTreeHostTestLayerOcclusion::beginTest): (WTF::CCLayerTreeHostTestLayerOcclusionWithFilters::beginTest): (WTF::CCLayerTreeHostTestManySurfaces::beginTest): * tests/CCSchedulerStateMachineTest.cpp: (WebCore::TEST): * tests/CCTiledLayerTestCommon.h: * tests/FakeWebGraphicsContext3D.h: (WebKit::FakeWebGraphicsContext3D::FakeWebGraphicsContext3D): (FakeWebGraphicsContext3D): (WebKit::FakeWebGraphicsContext3D::createTexture): * tests/LayerRendererChromiumTest.cpp: (TEST_F): * tests/TiledLayerChromiumTest.cpp: TBR=jamesr@google.com Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=122259

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+357 lines, -350 lines) Patch
M Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h View 4 chunks +3 lines, -2 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp View 8 chunks +32 lines, -15 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/TextureManager.h View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/TextureManager.cpp View 1 chunk +7 lines, -0 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/TrackingTextureAllocator.h View 3 chunks +5 lines, -2 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/TrackingTextureAllocator.cpp View 2 chunks +11 lines, -0 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h View 5 chunks +7 lines, -7 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp View 8 chunks +8 lines, -50 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h View 4 chunks +7 lines, -6 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp View 5 chunks +19 lines, -5 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCProxy.h View 2 chunks +2 lines, -1 line 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCRenderer.h View 1 chunk +2 lines, -1 line 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCScheduler.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCScheduler.cpp View 4 chunks +12 lines, -5 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCSchedulerStateMachine.h View 1 chunk +4 lines, -0 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp View 2 chunks +8 lines, -0 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.h View 3 chunks +1 line, -2 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp View 5 chunks +13 lines, -16 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h View 7 chunks +6 lines, -3 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp View 12 chunks +47 lines, -32 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.h View 2 chunks +5 lines, -5 lines 0 comments Download
M Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp View 8 chunks +34 lines, -16 lines 0 comments Download
M Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp View 8 chunks +21 lines, -9 lines 0 comments Download
M Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp View 13 chunks +45 lines, -118 lines 0 comments Download
M Source/WebKit/chromium/tests/CCSchedulerStateMachineTest.cpp View 2 chunks +5 lines, -26 lines 0 comments Download
M Source/WebKit/chromium/tests/CCTiledLayerTestCommon.h View 1 chunk +3 lines, -2 lines 0 comments Download
M Source/WebKit/chromium/tests/FakeWebGraphicsContext3D.h View 3 chunks +7 lines, -1 line 0 comments Download
M Source/WebKit/chromium/tests/LayerRendererChromiumTest.cpp View 3 chunks +33 lines, -18 lines 0 comments Download
M Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp View 7 chunks +7 lines, -8 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
danakj
8 years, 5 months ago (2012-07-10 20:53:10 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698