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

Issue 11361072: Remove WebCore::IntRect usage from compositor, except within Region. (Closed)

Created:
8 years, 1 month ago by danakj
Modified:
8 years, 1 month ago
Reviewers:
enne (OOO)
CC:
chromium-reviews, cc-bugs_chromium.org
Visibility:
Public.

Description

Remove WebCore::IntRect usage from compositor, except within Region. This adds an API to the Region class that is intended to be our final Region class interface. It uses an iterator to walk the rects in the Region, which is compatible with the SkRegion API, but can also hide the IntRects exposed by the WebCore Region API. Once this is done, there is no need to use cc::IntRect, and we can remove it entirely. Covered by existing tests; no change in behaviour. BUG=147395 R=enne

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -289 lines) Patch
M cc/cc.gyp View 2 chunks +0 lines, -2 lines 0 comments Download
M cc/layer.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/layer_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/layer_tree_host_unittest.cc View 11 chunks +39 lines, -39 lines 0 comments Download
M cc/occlusion_tracker.cc View 4 chunks +10 lines, -13 lines 0 comments Download
M cc/occlusion_tracker_unittest.cc View 51 chunks +136 lines, -134 lines 0 comments Download
M cc/render_pass.cc View 1 chunk +2 lines, -3 lines 0 comments Download
D cc/stubs/IntRect.h View 1 chunk +0 lines, -6 lines 0 comments Download
M cc/stubs/Region.h View 3 chunks +50 lines, -24 lines 2 comments Download
D cc/stubs/int_rect.h View 1 chunk +0 lines, -61 lines 0 comments Download
M cc/tiled_layer.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M cc/tiled_layer_unittest.cc View 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
danakj
Weee!
8 years, 1 month ago (2012-11-02 19:49:23 UTC) #1
danakj
If you like, I can move this class into cc/ and make it wrap Skia, ...
8 years, 1 month ago (2012-11-02 19:50:04 UTC) #2
enne (OOO)
https://codereview.chromium.org/11361072/diff/1/cc/stubs/Region.h File cc/stubs/Region.h (right): https://codereview.chromium.org/11361072/diff/1/cc/stubs/Region.h#newcode66 cc/stubs/Region.h:66: int size() { return m_rects.size(); } Why don't you ...
8 years, 1 month ago (2012-11-02 20:30:04 UTC) #3
danakj
https://codereview.chromium.org/11361072/diff/1/cc/stubs/Region.h File cc/stubs/Region.h (right): https://codereview.chromium.org/11361072/diff/1/cc/stubs/Region.h#newcode66 cc/stubs/Region.h:66: int size() { return m_rects.size(); } On 2012/11/02 20:30:04, ...
8 years, 1 month ago (2012-11-02 20:32:30 UTC) #4
enne (OOO)
8 years, 1 month ago (2012-11-02 20:40:27 UTC) #5
On 2012/11/02 20:32:30, danakj wrote:
> https://codereview.chromium.org/11361072/diff/1/cc/stubs/Region.h
> File cc/stubs/Region.h (right):
> 
> https://codereview.chromium.org/11361072/diff/1/cc/stubs/Region.h#newcode66
> cc/stubs/Region.h:66: int size() { return m_rects.size(); }
> On 2012/11/02 20:30:04, enne wrote:
> > Why don't you just add a NumRects() function?
> 
> Because it would be super costly with the WebCore implementation, which
suggests
> that maybe for other Region implementations it would be too. Whereas, there
are
> a non-zero number of cases where we want the size, and will be iterating
> (web_layer_impl.cc - incoming patch version). And constructing and iterator
and
> taking the size in tests can be slow but we won't care.

Ah, right.  Since it returns them all by value.

lgtm

Powered by Google App Engine
This is Rietveld 408576698