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

Issue 164203003: replace setConfig+allocPixels with alloc-or-install-pixels (Closed)

Created:
6 years, 10 months ago by reed2
Modified:
6 years, 10 months ago
Reviewers:
hal.canary, scroggo, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

replace setConfig+allocPixels with alloc-or-install-pixels BUG=skia: Committed: http://code.google.com/p/skia/source/detail?r=13442

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 7

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -129 lines) Patch
M tests/AAClipTest.cpp View 1 chunk +5 lines, -3 lines 0 comments Download
M tests/AnnotationTest.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M tests/BitmapHeapTest.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M tests/BitmapTest.cpp View 2 chunks +9 lines, -5 lines 0 comments Download
M tests/BlitRowTest.cpp View 1 2 3 6 chunks +24 lines, -26 lines 0 comments Download
M tests/BlurTest.cpp View 5 chunks +6 lines, -9 lines 0 comments Download
M tests/CanvasStateTest.cpp View 3 chunks +7 lines, -7 lines 0 comments Download
M tests/CanvasTest.cpp View 6 chunks +8 lines, -9 lines 0 comments Download
M tests/ClipCubicTest.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M tests/ClipperTest.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M tests/DeferredCanvasTest.cpp View 1 9 chunks +11 lines, -19 lines 0 comments Download
M tests/DeviceLooperTest.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M tests/DrawBitmapRectTest.cpp View 4 chunks +7 lines, -11 lines 0 comments Download
M tests/DrawPathTest.cpp View 1 2 3 2 chunks +5 lines, -16 lines 0 comments Download
M tests/ReadPixelsTest.cpp View 1 3 chunks +8 lines, -8 lines 0 comments Download
M tests/WritePixelsTest.cpp View 1 3 chunks +20 lines, -6 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
reed1
6 years, 10 months ago (2014-02-13 19:52:18 UTC) #1
scroggo
lgtm with comments https://codereview.chromium.org/164203003/diff/40017/tests/BlitRowTest.cpp File tests/BlitRowTest.cpp (right): https://codereview.chromium.org/164203003/diff/40017/tests/BlitRowTest.cpp#newcode15 tests/BlitRowTest.cpp:15: // these are in the same ...
6 years, 10 months ago (2014-02-13 20:26:03 UTC) #2
reed1
https://codereview.chromium.org/164203003/diff/40017/tests/BlitRowTest.cpp File tests/BlitRowTest.cpp (right): https://codereview.chromium.org/164203003/diff/40017/tests/BlitRowTest.cpp#newcode15 tests/BlitRowTest.cpp:15: // these are in the same order as the ...
6 years, 10 months ago (2014-02-13 20:48:36 UTC) #3
reed1
The CQ bit was checked by reed@google.com
6 years, 10 months ago (2014-02-13 20:50:20 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@chromium.org/164203003/140001
6 years, 10 months ago (2014-02-13 20:50:26 UTC) #5
scroggo
https://codereview.chromium.org/164203003/diff/40017/tests/WritePixelsTest.cpp File tests/WritePixelsTest.cpp (right): https://codereview.chromium.org/164203003/diff/40017/tests/WritePixelsTest.cpp#newcode316 tests/WritePixelsTest.cpp:316: SkPixelRef* pr = SkMallocPixelRef::NewAllocate(info, rowBytes, NULL); On 2014/02/13 20:48:37, ...
6 years, 10 months ago (2014-02-13 21:01:14 UTC) #6
reed1
On 2014/02/13 21:01:14, scroggo wrote: > https://codereview.chromium.org/164203003/diff/40017/tests/WritePixelsTest.cpp > File tests/WritePixelsTest.cpp (right): > > https://codereview.chromium.org/164203003/diff/40017/tests/WritePixelsTest.cpp#newcode316 > ...
6 years, 10 months ago (2014-02-13 21:05:22 UTC) #7
commit-bot: I haz the power
Change committed as 13442
6 years, 10 months ago (2014-02-13 22:00:11 UTC) #8
hal.canary
6 years, 10 months ago (2014-02-14 14:44:31 UTC) #9
Message was sent while issue was closed.
On 2014/02/13 21:05:22, reed1 wrote:
> On 2014/02/13 21:01:14, scroggo wrote:
> >
https://codereview.chromium.org/164203003/diff/40017/tests/WritePixelsTest.cpp
> > File tests/WritePixelsTest.cpp (right):
> > 
> >
>
https://codereview.chromium.org/164203003/diff/40017/tests/WritePixelsTest.cp...
> > tests/WritePixelsTest.cpp:316: SkPixelRef* pr =
> > SkMallocPixelRef::NewAllocate(info, rowBytes, NULL);
> > On 2014/02/13 20:48:37, reed1 wrote:
> > > On 2014/02/13 20:26:03, scroggo wrote:
> > > > Won't allocPixels do this for you?
> > > 
> > > allocPixels doesn't let me pass in a rowBytes, which is deliberate, as
we're
> > > trying to convince our clients to *not* specify the rowBytes unless they
are
> > > explicitly specifying the pixelref at the same time.
> > > 
> > > I have/had a CL for installPixelRef() that encapsulates this, but have had
> > other
> > > problems landing it. It may be landable now/soon.
> > 
> > The version of allocPixels that calls the standard allocator respects the
> > rowbytes on the bitmap (which you set above). Maybe in some future world you
> > won't be able to modify the rowbytes in setConfig (since it won't be known
> > unless locked), but for now allocPixels should work fine here.
> 
> Ah, you are referring to allocPixels() with no (visible) arguments?
> 
> Yes, tho I think we should stop using that too, since it relys on the bitmap
> knowing a rowBytes up front, without any pixelRef installed.

We should be clear in SkBitmap::Allocator's documentation whether it is allowed
to modify rowBytes, required to respect it, or just required to validate it.  Or
we can mark SkBitmap::Allocator as deprecated and replace it with the version of
allocPixels that uses a SkPixelRefFactory.

Powered by Google App Engine
This is Rietveld 408576698