|
|
Created:
4 years, 3 months ago by chrishtr Modified:
4 years, 3 months ago CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), jbroman, Justin Novosad, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionReuse cc::PictureLayers when possible for SPv2.
The approach is very simple: if the PaintChunk.id's match, then reuse the layer
backing a chunk, and rely on the raster invalidations to invalidate as needed if
content changes or moves relative to the PaintChunk.
BUG=647831
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Committed: https://crrev.com/06af5b6237a576c36a74c607d154b93320985503
Cr-Commit-Position: refs/heads/master@{#420571}
Patch Set 1 #Patch Set 2 : none #Patch Set 3 : none #
Total comments: 11
Patch Set 4 : none #Patch Set 5 : none #Patch Set 6 : none #Patch Set 7 : none #
Total comments: 8
Patch Set 8 : none #Patch Set 9 : none #Patch Set 10 : none #Patch Set 11 : none #Patch Set 12 : none #
Total comments: 4
Patch Set 13 : none #Patch Set 14 : none #Patch Set 15 : none #Patch Set 16 : none #Patch Set 17 : none #Patch Set 18 : none #Patch Set 19 : none #Patch Set 20 : none #Messages
Total messages: 71 (45 generated)
Description was changed from ========== none none none none BUG= ========== to ========== none none none none BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 ==========
Description was changed from ========== none none none none BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 ========== to ========== Reuse cc::PictureLayers when possible for SPv2. BUG=647831 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 ==========
The CQ bit was checked by chrishtr@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
The CQ bit was checked by chrishtr@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_layout_tests_slimming_paint_v2 on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_layout_te...)
The CQ bit was checked by chrishtr@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Reuse cc::PictureLayers when possible for SPv2. BUG=647831 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 ========== to ========== Reuse cc::PictureLayers when possible for SPv2. The approach is very simple: if the PaintChunk.id's match, then reuse the layer backing a chunk, and rely on the raster invalidations to invalidate as needed if content changes or moves relative to the PaintChunk. BUG=647831 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 ==========
chrishtr@chromium.org changed reviewers: + pdr@chromium.org, wangxianzhu@chromium.org
https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/paint/PaintInvalidator.cpp (right): https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/paint/PaintInvalidator.cpp:59: if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) In a followup I propose to simplify the code in this class for SPv2. SPv2 doesn't need the notion of a paint invalidation container at all. WDYT?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_comp...) chromeos_x86-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_x86-ge...)
https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/LayoutObject.cpp (right): https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/LayoutObject.cpp:1085: name.append(String::format(" %p", this)); The output of debugName() is used in layout test outputs, so it should not include anything that can change between runs. https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/paint/PaintInvalidator.cpp (right): https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/paint/PaintInvalidator.cpp:59: if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) On 2016/09/20 22:40:58, chrishtr wrote: > In a followup I propose to simplify the code in this class for SPv2. SPv2 > doesn't need the notion of a > paint invalidation container at all. WDYT? Agreed. https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/paint/PaintInvalidator.cpp:62: bool success = false; Nit: don't move this line. https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp (right): https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp:208: } I'm a bit concerned about performance here. Perhaps we can use the same search algorithm in PaintController (sequential search + hashmap for out-of-order search) (not necessarily in this patch). https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp (right): https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp:31: if (drawing.knownToBeOpaque()) { There seems a problem: the picture may be smaller than the client's visual rect (which covers all pictures of the client), so one picture is opaque doesn't mean the whole client visual rect is opaque.
https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/layout/LayoutObject.cpp (right): https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/layout/LayoutObject.cpp:1085: name.append(String::format(" %p", this)); On 2016/09/20 at 23:13:41, Xianzhu wrote: > The output of debugName() is used in layout test outputs, so it should not include anything that can change between runs. Good point. Removed. https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/paint/PaintInvalidator.cpp (right): https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/paint/PaintInvalidator.cpp:62: bool success = false; On 2016/09/20 at 23:13:41, Xianzhu wrote: > Nit: don't move this line. Done. https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp (right): https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp:208: } On 2016/09/20 at 23:13:41, Xianzhu wrote: > I'm a bit concerned about performance here. Perhaps we can use the same search algorithm in PaintController (sequential search + hashmap for out-of-order search) (not necessarily in this patch). Oh, forgot to add a TODO about this. I agree. https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp (right): https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/graphics/paint/PaintArtifact.cpp:31: if (drawing.knownToBeOpaque()) { On 2016/09/20 at 23:13:41, Xianzhu wrote: > There seems a problem: the picture may be smaller than the client's visual rect (which covers all pictures of the client), so one picture is opaque doesn't mean the whole client visual rect is opaque. Good point. Reverted this part.
The CQ bit was checked by chrishtr@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_layout_tests_slimming_paint_v2 on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_layout_te...)
https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/paint/PaintInvalidator.cpp (right): https://codereview.chromium.org/2345233004/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/core/paint/PaintInvalidator.cpp:62: bool success = false; Nit: move this back down https://codereview.chromium.org/2345233004/diff/120001/content/shell/renderer... File content/shell/renderer/layout_test/blink_test_runner.cc (right): https://codereview.chromium.org/2345233004/diff/120001/content/shell/renderer... content/shell/renderer/layout_test/blink_test_runner.cc:582: if (!is_main_window_ || !render_view()->GetMainRenderFrame()) { Nit: I think the indentation got lost here. https://codereview.chromium.org/2345233004/diff/120001/third_party/WebKit/Sou... File third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp (right): https://codereview.chromium.org/2345233004/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp:228: contentLayerClient->SetPaintableRegion(gfx::Rect(combinedBounds.size())); Can the combined bounds grow? https://codereview.chromium.org/2345233004/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp:553: DCHECK above that m_newContentLayerClients is empty? https://codereview.chromium.org/2345233004/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp:557: scoped_refptr<cc::Layer> layer = layerForPaintChunk(paintArtifact, paintChunk, layerOffset); Do we need the m_newContentLayerClients member since it's just used locally here? IOW, can we just create a local for newContentLayerClients and pass it into layerForPaintChunk?
See also the change to PaintInvalidationCapableScrollableArea. https://codereview.chromium.org/2345233004/diff/120001/content/shell/renderer... File content/shell/renderer/layout_test/blink_test_runner.cc (right): https://codereview.chromium.org/2345233004/diff/120001/content/shell/renderer... content/shell/renderer/layout_test/blink_test_runner.cc:582: if (!is_main_window_ || !render_view()->GetMainRenderFrame()) { On 2016/09/21 at 02:46:13, pdr. wrote: > Nit: I think the indentation got lost here. Fixed. https://codereview.chromium.org/2345233004/diff/120001/third_party/WebKit/Sou... File third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp (right): https://codereview.chromium.org/2345233004/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp:228: contentLayerClient->SetPaintableRegion(gfx::Rect(combinedBounds.size())); On 2016/09/21 at 02:46:13, pdr. wrote: > Can the combined bounds grow? Yes. https://codereview.chromium.org/2345233004/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp:553: On 2016/09/21 at 02:46:13, pdr. wrote: > DCHECK above that m_newContentLayerClients is empty? Now unnecessary due to the below suggestion. https://codereview.chromium.org/2345233004/diff/120001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp:557: scoped_refptr<cc::Layer> layer = layerForPaintChunk(paintArtifact, paintChunk, layerOffset); On 2016/09/21 at 02:46:13, pdr. wrote: > Do we need the m_newContentLayerClients member since it's just used locally here? IOW, can we just create a local for newContentLayerClients and pass it into layerForPaintChunk? Done.
Update to the latest patchset.
LGTM https://codereview.chromium.org/2345233004/diff/220001/third_party/WebKit/Sou... File third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp (right): https://codereview.chromium.org/2345233004/diff/220001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp:205: // TODO(chrishtr): for now, just using a linear walk. In the future we can optimize this by using the same techniques used in Xianzhu, I think this looks good but can you triple-check? https://codereview.chromium.org/2345233004/diff/220001/third_party/WebKit/Sou... File third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h (right): https://codereview.chromium.org/2345233004/diff/220001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h:86: Vector<std::unique_ptr<ContentLayerClientImpl>> m_currentContentLayerClients; Nit: revert this back to m_contentLayerClients
lgtm
The CQ bit was checked by chrishtr@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from pdr@chromium.org, wangxianzhu@chromium.org Link to the patchset: https://codereview.chromium.org/2345233004/#ps240001 (title: "none")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by chrishtr@chromium.org
https://codereview.chromium.org/2345233004/diff/220001/third_party/WebKit/Sou... File third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp (right): https://codereview.chromium.org/2345233004/diff/220001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp:205: // TODO(chrishtr): for now, just using a linear walk. In the future we can optimize this by using the same techniques used in On 2016/09/21 at 22:45:12, pdr. wrote: > Xianzhu, I think this looks good but can you triple-check? FYI he commented on this earlier in the code review. https://codereview.chromium.org/2345233004/diff/220001/third_party/WebKit/Sou... File third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h (right): https://codereview.chromium.org/2345233004/diff/220001/third_party/WebKit/Sou... third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.h:86: Vector<std::unique_ptr<ContentLayerClientImpl>> m_currentContentLayerClients; On 2016/09/21 at 22:45:12, pdr. wrote: > Nit: revert this back to m_contentLayerClients Done.
The CQ bit was checked by chrishtr@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from pdr@chromium.org, wangxianzhu@chromium.org Link to the patchset: https://codereview.chromium.org/2345233004/#ps260001 (title: "none")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_layout_tests_slimming_paint_v2 on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_layout_te...)
The CQ bit was checked by chrishtr@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from pdr@chromium.org, wangxianzhu@chromium.org Link to the patchset: https://codereview.chromium.org/2345233004/#ps280001 (title: "none")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_layout_tests_slimming_paint_v2 on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_layout_te...)
The CQ bit was checked by chrishtr@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_layout_tests_slimming_paint_v2 on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_layout_te...)
The CQ bit was checked by chrishtr@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from pdr@chromium.org, wangxianzhu@chromium.org Link to the patchset: https://codereview.chromium.org/2345233004/#ps300001 (title: "none")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_layout_tests_slimming_paint_v2 on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_layout_te...)
The CQ bit was checked by chrishtr@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from pdr@chromium.org, wangxianzhu@chromium.org Link to the patchset: https://codereview.chromium.org/2345233004/#ps320001 (title: "none")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by chrishtr@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from pdr@chromium.org, wangxianzhu@chromium.org Link to the patchset: https://codereview.chromium.org/2345233004/#ps340001 (title: "none")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_layout_tests_slimming_paint_v2 on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_layout_te...)
The CQ bit was checked by chrishtr@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from pdr@chromium.org, wangxianzhu@chromium.org Link to the patchset: https://codereview.chromium.org/2345233004/#ps360001 (title: "none")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_layout_tests_slimming_paint_v2 on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_layout_te...)
The CQ bit was checked by chrishtr@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from pdr@chromium.org, wangxianzhu@chromium.org Link to the patchset: https://codereview.chromium.org/2345233004/#ps380001 (title: "none")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #20 (id:380001)
Message was sent while issue was closed.
Description was changed from ========== Reuse cc::PictureLayers when possible for SPv2. The approach is very simple: if the PaintChunk.id's match, then reuse the layer backing a chunk, and rely on the raster invalidations to invalidate as needed if content changes or moves relative to the PaintChunk. BUG=647831 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 ========== to ========== Reuse cc::PictureLayers when possible for SPv2. The approach is very simple: if the PaintChunk.id's match, then reuse the layer backing a chunk, and rely on the raster invalidations to invalidate as needed if content changes or moves relative to the PaintChunk. BUG=647831 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Committed: https://crrev.com/06af5b6237a576c36a74c607d154b93320985503 Cr-Commit-Position: refs/heads/master@{#420571} ==========
Message was sent while issue was closed.
Patchset 20 (id:??) landed as https://crrev.com/06af5b6237a576c36a74c607d154b93320985503 Cr-Commit-Position: refs/heads/master@{#420571} |