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

Issue 23484005: Skip clearing the canvas before painting the contents of opaque layers (Closed)

Created:
7 years, 3 months ago by Vangelis Kokkevis
Modified:
7 years, 3 months ago
Reviewers:
enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

Skip clearing the canvas before painting the contents of opaque layers The SkCanvas doesn't need to be cleared before painting the layer contents if the layer is known to be opaque (e.g. the root layer). Bypassing the clear gives a sizeable perf boost. This patch also switches to calling clear() instead of drawRect() for clearing the canvas pixels as clear has been shown to be significantly faster. BUG=279612 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=219894

Patch Set 1 #

Patch Set 2 : Use fast clear #

Patch Set 3 : fixed virtual OVERRIDE #

Total comments: 1

Patch Set 4 : Remove slow clear #

Patch Set 5 : Remove unecessary newline #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -29 lines) Patch
M cc/resources/bitmap_content_layer_updater.cc View 1 2 3 3 chunks +6 lines, -6 lines 0 comments Download
M cc/resources/content_layer_updater.h View 1 2 3 3 chunks +8 lines, -1 line 0 comments Download
M cc/resources/content_layer_updater.cc View 1 2 3 4 5 chunks +19 lines, -8 lines 0 comments Download
M cc/resources/skpicture_content_layer_updater.h View 2 chunks +0 lines, -7 lines 0 comments Download
M cc/resources/skpicture_content_layer_updater.cc View 1 2 3 3 chunks +2 lines, -7 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Vangelis Kokkevis
Ready for review.
7 years, 3 months ago (2013-08-27 02:00:46 UTC) #1
enne (OOO)
https://codereview.chromium.org/23484005/diff/9001/cc/resources/content_layer_updater.cc File cc/resources/content_layer_updater.cc (right): https://codereview.chromium.org/23484005/diff/9001/cc/resources/content_layer_updater.cc#newcode71 cc/resources/content_layer_updater.cc:71: canvas->drawRect(layer_sk_rect, paint); Could you just have the first branch ...
7 years, 3 months ago (2013-08-27 17:13:04 UTC) #2
Vangelis Kokkevis
Thanks, Enne. Modified the code as per your suggestion. PTAL.
7 years, 3 months ago (2013-08-27 19:59:59 UTC) #3
enne (OOO)
lgtm
7 years, 3 months ago (2013-08-27 20:19:11 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vangelis@chromium.org/23484005/19001
7 years, 3 months ago (2013-08-27 20:19:19 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vangelis@chromium.org/23484005/19001
7 years, 3 months ago (2013-08-28 01:10:02 UTC) #6
commit-bot: I haz the power
7 years, 3 months ago (2013-08-28 03:30:58 UTC) #7
Message was sent while issue was closed.
Change committed as 219894

Powered by Google App Engine
This is Rietveld 408576698