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

Issue 11044003: Reduce texture uploads during scrollbar invalidations. (Closed)

Created:
8 years, 2 months ago by wjmaclean
Modified:
8 years, 2 months ago
Reviewers:
jamesr, enne (OOO)
CC:
chromium-reviews, backer, tfarina
Visibility:
Public.

Description

Reduce texture uploads during scrollbar invalidations. BUG=152286 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=159983

Patch Set 1 #

Patch Set 2 : Fix DEPS for skia/ext access. #

Total comments: 28

Patch Set 3 : Address review comments. #

Total comments: 5

Patch Set 4 : Use hash instead, don't override updateRect. #

Total comments: 2

Patch Set 5 : Revert use of hash; address texture eviction. #

Total comments: 10

Patch Set 6 : Remove virtual pixelsDidChange, fix nits. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -11 lines) Patch
M cc/BitmapCanvasLayerTextureUpdater.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M cc/DEPS View 1 1 chunk +1 line, -0 lines 0 comments Download
M cc/ScrollbarLayerChromium.h View 1 2 3 4 5 3 chunks +5 lines, -5 lines 0 comments Download
M cc/ScrollbarLayerChromium.cpp View 1 2 3 4 5 3 chunks +7 lines, -5 lines 2 comments Download
A cc/caching_bitmap_canvas_layer_texture_updater.h View 1 2 3 4 5 1 chunk +38 lines, -0 lines 0 comments Download
A cc/caching_bitmap_canvas_layer_texture_updater.cc View 1 2 3 4 5 1 chunk +59 lines, -0 lines 0 comments Download
M cc/cc.gyp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
wjmaclean
Here is the bitmap comparison approach as promised. Sorry for the delay, had to re-learn ...
8 years, 2 months ago (2012-10-02 20:31:59 UTC) #1
jamesr
Some style issues https://codereview.chromium.org/11044003/diff/2001/cc/caching_bitmap_canvas_layer_texture_updater.cc File cc/caching_bitmap_canvas_layer_texture_updater.cc (right): https://codereview.chromium.org/11044003/diff/2001/cc/caching_bitmap_canvas_layer_texture_updater.cc#newcode7 cc/caching_bitmap_canvas_layer_texture_updater.cc:7: #if USE(ACCELERATED_COMPOSITING) no https://codereview.chromium.org/11044003/diff/2001/cc/caching_bitmap_canvas_layer_texture_updater.cc#newcode9 cc/caching_bitmap_canvas_layer_texture_updater.cc:9: #include ...
8 years, 2 months ago (2012-10-02 20:57:54 UTC) #2
jamesr
Did you consider just caching the pixels directly on either ScrollbarLayerChromium or CCScrollbarLayerImpl rather than ...
8 years, 2 months ago (2012-10-02 20:59:15 UTC) #3
jamesr
https://codereview.chromium.org/11044003/diff/2001/cc/caching_bitmap_canvas_layer_texture_updater.cc File cc/caching_bitmap_canvas_layer_texture_updater.cc (right): https://codereview.chromium.org/11044003/diff/2001/cc/caching_bitmap_canvas_layer_texture_updater.cc#newcode46 cc/caching_bitmap_canvas_layer_texture_updater.cc:46: for (unsigned row = 0; pixels_match && row < ...
8 years, 2 months ago (2012-10-02 21:02:00 UTC) #4
enne (OOO)
On 2012/10/02 20:59:15, jamesr wrote: > Did you consider just caching the pixels directly on ...
8 years, 2 months ago (2012-10-02 21:03:13 UTC) #5
enne (OOO)
https://codereview.chromium.org/11044003/diff/2001/cc/caching_bitmap_canvas_layer_texture_updater.cc File cc/caching_bitmap_canvas_layer_texture_updater.cc (right): https://codereview.chromium.org/11044003/diff/2001/cc/caching_bitmap_canvas_layer_texture_updater.cc#newcode88 cc/caching_bitmap_canvas_layer_texture_updater.cc:88: if (texture_ueeds_upload_) { style nit: just early out here. ...
8 years, 2 months ago (2012-10-02 21:07:18 UTC) #6
wjmaclean
New patch in a few minutes ... https://codereview.chromium.org/11044003/diff/2001/cc/caching_bitmap_canvas_layer_texture_updater.cc File cc/caching_bitmap_canvas_layer_texture_updater.cc (right): https://codereview.chromium.org/11044003/diff/2001/cc/caching_bitmap_canvas_layer_texture_updater.cc#newcode7 cc/caching_bitmap_canvas_layer_texture_updater.cc:7: #if USE(ACCELERATED_COMPOSITING) ...
8 years, 2 months ago (2012-10-02 21:43:46 UTC) #7
jamesr
What happens if we upload a part, get the texture evicted, and then go to ...
8 years, 2 months ago (2012-10-02 21:50:48 UTC) #8
tfarina
http://codereview.chromium.org/11044003/diff/3007/cc/caching_bitmap_canvas_layer_texture_updater.h File cc/caching_bitmap_canvas_layer_texture_updater.h (right): http://codereview.chromium.org/11044003/diff/3007/cc/caching_bitmap_canvas_layer_texture_updater.h#newcode5 cc/caching_bitmap_canvas_layer_texture_updater.h:5: #ifndef CACHING_BITMAP_CANVAS_LAYER_TEXTURE_UPDATER_H_ CC_CACHING_BITMAP_CANVAS_LAYER_TEXTURE_UPDATER_H_ http://codereview.chromium.org/11044003/diff/3007/cc/caching_bitmap_canvas_layer_texture_updater.h#newcode33 cc/caching_bitmap_canvas_layer_texture_updater.h:33: PassOwnPtr<LayerPainterChromium> painter); can you ...
8 years, 2 months ago (2012-10-02 21:58:29 UTC) #9
jamesr
I think this is OK, but the LayerTextureUpdater system is a lot more general than ...
8 years, 2 months ago (2012-10-02 23:29:49 UTC) #10
wjmaclean
On 2012/10/02 21:50:48, jamesr wrote: > What happens if we upload a part, get the ...
8 years, 2 months ago (2012-10-03 13:14:15 UTC) #11
wjmaclean
OK, this patch doesn't use memcmp, instead it computes a hash signature (kudos backer@ for ...
8 years, 2 months ago (2012-10-03 15:49:24 UTC) #12
jonathan.backer
I steered you wrong wjmaclean@. I think that the memcmp is neon optimized whereas the ...
8 years, 2 months ago (2012-10-03 16:55:57 UTC) #13
jonathan.backer
On 2012/10/03 16:55:57, jonathan.backer wrote: > I steered you wrong wjmaclean@. I think that the ...
8 years, 2 months ago (2012-10-03 18:05:04 UTC) #14
enne (OOO)
https://codereview.chromium.org/11044003/diff/6002/cc/ScrollbarLayerChromium.cpp File cc/ScrollbarLayerChromium.cpp (right): https://codereview.chromium.org/11044003/diff/6002/cc/ScrollbarLayerChromium.cpp#newcode234 cc/ScrollbarLayerChromium.cpp:234: if (!static_cast<CachingBitmapCanvasLayerTextureUpdater*>(painter)->PixelsDidChange()) Please change the signature on updatePart to ...
8 years, 2 months ago (2012-10-03 18:05:26 UTC) #15
wjmaclean
Here's a new patch. I took out the hash as it was slower than memcmp, ...
8 years, 2 months ago (2012-10-03 19:14:59 UTC) #16
jamesr
https://codereview.chromium.org/11044003/diff/1015/cc/LayerTextureUpdater.h File cc/LayerTextureUpdater.h (right): https://codereview.chromium.org/11044003/diff/1015/cc/LayerTextureUpdater.h#newcode64 cc/LayerTextureUpdater.h:64: virtual bool pixelsDidChange() const; this is unnecessary. Keep the ...
8 years, 2 months ago (2012-10-03 19:28:02 UTC) #17
jamesr
lgtm with those fixes. Enne? https://codereview.chromium.org/11044003/diff/1015/cc/caching_bitmap_canvas_layer_texture_updater.h File cc/caching_bitmap_canvas_layer_texture_updater.h (right): https://codereview.chromium.org/11044003/diff/1015/cc/caching_bitmap_canvas_layer_texture_updater.h#newcode29 cc/caching_bitmap_canvas_layer_texture_updater.h:29: CachingBitmapCanvasLayerTextureUpdater( explicit
8 years, 2 months ago (2012-10-03 19:29:13 UTC) #18
enne (OOO)
This is really close, in my opinion. https://codereview.chromium.org/11044003/diff/1015/cc/LayerTextureUpdater.h File cc/LayerTextureUpdater.h (right): https://codereview.chromium.org/11044003/diff/1015/cc/LayerTextureUpdater.h#newcode64 cc/LayerTextureUpdater.h:64: virtual bool ...
8 years, 2 months ago (2012-10-03 19:31:42 UTC) #19
wjmaclean
I think I've addressed all the comments, ptal. https://codereview.chromium.org/11044003/diff/1015/cc/LayerTextureUpdater.h File cc/LayerTextureUpdater.h (right): https://codereview.chromium.org/11044003/diff/1015/cc/LayerTextureUpdater.h#newcode64 cc/LayerTextureUpdater.h:64: virtual ...
8 years, 2 months ago (2012-10-03 20:14:30 UTC) #20
jamesr
lgtm https://codereview.chromium.org/11044003/diff/16002/cc/ScrollbarLayerChromium.cpp File cc/ScrollbarLayerChromium.cpp (right): https://codereview.chromium.org/11044003/diff/16002/cc/ScrollbarLayerChromium.cpp#newcode233 cc/ScrollbarLayerChromium.cpp:233: return; place add a TRACE_INSTANT0("cc", ...) here so ...
8 years, 2 months ago (2012-10-03 20:22:32 UTC) #21
enne (OOO)
lgtm
8 years, 2 months ago (2012-10-03 20:36:33 UTC) #22
wjmaclean
8 years, 2 months ago (2012-10-03 21:30:53 UTC) #23
CL dcommitted with TRACE added.

https://codereview.chromium.org/11044003/diff/16002/cc/ScrollbarLayerChromium...
File cc/ScrollbarLayerChromium.cpp (right):

https://codereview.chromium.org/11044003/diff/16002/cc/ScrollbarLayerChromium...
cc/ScrollbarLayerChromium.cpp:233: return;
On 2012/10/03 20:22:33, jamesr wrote:
> place add a TRACE_INSTANT0("cc", ...) here so we can know when we're hitting
> (and thus not hitting) this optimization in the wild

Good plan - done!

Powered by Google App Engine
This is Rietveld 408576698