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

Issue 10919320: Integrate r128344 and r128253 from WebKit (Closed)

Created:
8 years, 3 months ago by ccameron
Modified:
8 years, 3 months ago
Reviewers:
jamesr
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

Integrate r128344 and r128253 from WebKit Synopsis of changes below: [chromium] Evict textures through the texture manager instead of the resource provider https://bugs.webkit.org/show_bug.cgi?id=96463 Reviewed by NOBODY (OOPS!). When deleting contents textures' resources on the impl thread, do the deletion through the CCPrioritizedTextureManager instead of the CCResourceProvider. This requires traversing the backings list on the impl thread while the main thread is running, so remove the one remaining traversal of the backings list by the main thread. This traversal happens when unlinking textures that were evicted by the impl thread, so explicitly send the list of evicted backings from the impl thread to the main thread. Unify all resource deletion paths in the CCPrioritizedTextureManager. Always perform the sequence of eviction (deleting the GL resource) and then destruction of evicted backings (deleting the objects). Also, use the same function (evictBackingsToReduceMemory) to reduce memory consumption both during commit and when done by the impl thread in response to a request by the GPU memory manager. Note that destroying only some of the resources at a time during texture eviction (as opposed all resources) is still not supported because the texture upload queues cannot be only-partially invalidated yet. Updated tests to take this behavior into account. [chromium] Make prioritized texture manager not touch backings array on the main thread https://bugs.webkit.org/show_bug.cgi?id=96114 Reviewed by NOBODY (OOPS!). Take a snapshot of the textures' priorities from the main thread, and save it in their backings for access by the impl thread. Update functions that access the sorted backings array to use the snapshotted values instead of the values that the main thread may have computed for the next frame. Make the main thread not touch the m_backings array. Split prioritizeTextures into a updateBackingsPriorities function. In places where the main thread would have touched m_backings, set a flag specifying that m_backings needs to be re-sorted before any function that requires it be sorted by priority be executed. Update the two functions that require sorted order (acquireBacking and reduceMemory) to sort the backings array (if needed) before traversing it. Updated tests to set correct thread during asserts. Add a test to verify that requestLate is correctly incorporated into the backing sorting. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157412

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix unit test build break #

Unified diffs Side-by-side diffs Delta from patch set Stats (+386 lines, -141 lines) Patch
M cc/CCLayerTreeHost.h View 1 chunk +13 lines, -2 lines 0 comments Download
M cc/CCLayerTreeHost.cpp View 1 chunk +19 lines, -4 lines 0 comments Download
M cc/CCLayerTreeHostImpl.h View 2 chunks +2 lines, -0 lines 0 comments Download
M cc/CCLayerTreeHostImpl.cpp View 2 chunks +8 lines, -2 lines 0 comments Download
M cc/CCLayerTreeHostImplTest.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M cc/CCPrioritizedTexture.h View 1 chunk +11 lines, -3 lines 0 comments Download
M cc/CCPrioritizedTexture.cpp View 2 chunks +29 lines, -0 lines 0 comments Download
M cc/CCPrioritizedTextureManager.h View 5 chunks +40 lines, -15 lines 0 comments Download
M cc/CCPrioritizedTextureManager.cpp View 12 chunks +117 lines, -70 lines 0 comments Download
M cc/CCPrioritizedTextureTest.cpp View 1 20 chunks +96 lines, -19 lines 0 comments Download
M cc/CCSingleThreadProxy.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/CCSingleThreadProxy.cpp View 2 chunks +18 lines, -4 lines 0 comments Download
M cc/CCThreadProxy.h View 3 chunks +3 lines, -2 lines 0 comments Download
M cc/CCThreadProxy.cpp View 8 chunks +28 lines, -20 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
ccameron
8 years, 3 months ago (2012-09-17 16:54:41 UTC) #1
jamesr
lgtm https://codereview.chromium.org/10919320/diff/1/cc/CCPrioritizedTextureTest.cpp File cc/CCPrioritizedTextureTest.cpp (right): https://codereview.chromium.org/10919320/diff/1/cc/CCPrioritizedTextureTest.cpp#newcode21 cc/CCPrioritizedTextureTest.cpp:21: namespace WebCore { is this change deliberate? normally ...
8 years, 3 months ago (2012-09-17 18:11:08 UTC) #2
ccameron
Thanks! https://codereview.chromium.org/10919320/diff/1/cc/CCPrioritizedTextureTest.cpp File cc/CCPrioritizedTextureTest.cpp (right): https://codereview.chromium.org/10919320/diff/1/cc/CCPrioritizedTextureTest.cpp#newcode21 cc/CCPrioritizedTextureTest.cpp:21: namespace WebCore { On 2012/09/17 18:11:08, jamesr wrote: ...
8 years, 3 months ago (2012-09-17 18:15:59 UTC) #3
jamesr
https://codereview.chromium.org/10919320/diff/1/cc/CCPrioritizedTextureTest.cpp File cc/CCPrioritizedTextureTest.cpp (right): https://codereview.chromium.org/10919320/diff/1/cc/CCPrioritizedTextureTest.cpp#newcode21 cc/CCPrioritizedTextureTest.cpp:21: namespace WebCore { On 2012/09/17 18:15:59, ccameron1 wrote: > ...
8 years, 3 months ago (2012-09-17 18:24:08 UTC) #4
ccameron
https://codereview.chromium.org/10919320/diff/1/cc/CCPrioritizedTextureTest.cpp File cc/CCPrioritizedTextureTest.cpp (right): https://codereview.chromium.org/10919320/diff/1/cc/CCPrioritizedTextureTest.cpp#newcode21 cc/CCPrioritizedTextureTest.cpp:21: namespace WebCore { On 2012/09/17 18:24:08, jamesr wrote: > ...
8 years, 3 months ago (2012-09-17 18:30:30 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/10919320/3002
8 years, 3 months ago (2012-09-18 18:08:49 UTC) #6
commit-bot: I haz the power
8 years, 3 months ago (2012-09-18 20:29:10 UTC) #7
Change committed as 157412

Powered by Google App Engine
This is Rietveld 408576698