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

Issue 199413013: add new readPixels with direct memory parameters (Closed)

Created:
6 years, 9 months ago by reed1
Modified:
6 years, 5 months ago
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

add new readPixels with direct memory parameters BUG=skia: Committed: http://code.google.com/p/skia/source/detail?r=13840

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 2

Patch Set 9 : #

Patch Set 10 : rebase #

Patch Set 11 : #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+327 lines, -147 lines) Patch
D bench/PremulAndUnpremulAlphaOpsBench.cpp View 1 2 3 4 5 6 7 8 2 chunks +28 lines, -33 lines 2 comments Download
M gyp/skia_for_chromium_defines.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkBitmapDevice.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M include/core/SkCanvas.h View 1 2 3 4 5 6 7 8 9 3 chunks +37 lines, -7 lines 0 comments Download
M include/core/SkDevice.h View 1 2 3 4 5 6 7 8 9 3 chunks +14 lines, -3 lines 2 comments Download
M include/gpu/SkGpuDevice.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M include/pdf/SkPDFDevice.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/core/SkBitmapDevice.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +31 lines, -3 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +81 lines, -16 lines 2 comments Download
M src/core/SkDevice.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +20 lines, -1 line 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +21 lines, -1 line 0 comments Download
M src/pdf/SkPDFDevice.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M src/utils/SkDeferredCanvas.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +11 lines, -0 lines 0 comments Download
M src/utils/SkGatherPixelRefsAndRects.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -6 lines 0 comments Download
M src/utils/SkPictureUtils.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -7 lines 0 comments Download
M tests/PremulAlphaRoundTripTest.cpp View 1 2 2 chunks +13 lines, -12 lines 0 comments Download
M tests/ReadPixelsTest.cpp View 1 2 3 4 5 9 chunks +43 lines, -57 lines 0 comments Download
M tools/sk_tool_utils.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M tools/sk_tool_utils.cpp View 1 2 3 4 5 6 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
reed1
WIP
6 years, 9 months ago (2014-03-14 18:51:23 UTC) #1
reed1
ptal -- will land w/ guard for Chrome, until I can fix its call-sites
6 years, 9 months ago (2014-03-17 17:55:59 UTC) #2
bsalomon
https://codereview.chromium.org/199413013/diff/120001/bench/PremulAndUnpremulAlphaOpsBench.cpp File bench/PremulAndUnpremulAlphaOpsBench.cpp (left): https://codereview.chromium.org/199413013/diff/120001/bench/PremulAndUnpremulAlphaOpsBench.cpp#oldcode14 bench/PremulAndUnpremulAlphaOpsBench.cpp:14: class PremulAndUnpremulAlphaOpsBench : public SkBenchmark { Removing this benchmark ...
6 years, 9 months ago (2014-03-17 18:19:47 UTC) #3
reed1
https://codereview.chromium.org/199413013/diff/120001/bench/PremulAndUnpremulAlphaOpsBench.cpp File bench/PremulAndUnpremulAlphaOpsBench.cpp (left): https://codereview.chromium.org/199413013/diff/120001/bench/PremulAndUnpremulAlphaOpsBench.cpp#oldcode14 bench/PremulAndUnpremulAlphaOpsBench.cpp:14: class PremulAndUnpremulAlphaOpsBench : public SkBenchmark { On 2014/03/17 18:19:47, ...
6 years, 9 months ago (2014-03-17 18:47:09 UTC) #4
reed1
ptal
6 years, 9 months ago (2014-03-17 18:47:19 UTC) #5
bsalomon
lgtm
6 years, 9 months ago (2014-03-17 19:00:06 UTC) #6
reed1
The CQ bit was checked by reed@google.com
6 years, 9 months ago (2014-03-17 19:36:45 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/199413013/140001
6 years, 9 months ago (2014-03-17 19:36:54 UTC) #8
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-17 19:37:14 UTC) #9
commit-bot: I haz the power
Failed to apply patch for src/core/SkDevice.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-17 19:37:19 UTC) #10
reed1
The CQ bit was checked by reed@google.com
6 years, 9 months ago (2014-03-17 19:47:01 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/199413013/20002
6 years, 9 months ago (2014-03-17 19:47:06 UTC) #12
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-17 19:56:46 UTC) #13
commit-bot: I haz the power
Retried try job too often on Build-Mac10.8-Clang-x86-Release-Trybot for step(s) BuildBench, BuildEverything, BuildTools http://108.170.219.164:10117/buildstatus?builder=Build-Mac10.8-Clang-x86-Release-Trybot&number=323
6 years, 9 months ago (2014-03-17 19:56:49 UTC) #14
reed1
The CQ bit was checked by reed@google.com
6 years, 9 months ago (2014-03-17 21:10:17 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/reed@google.com/199413013/140002
6 years, 9 months ago (2014-03-17 21:10:23 UTC) #16
commit-bot: I haz the power
Change committed as 13840
6 years, 9 months ago (2014-03-17 21:31:39 UTC) #17
scroggo
lgtm https://codereview.chromium.org/199413013/diff/140002/include/core/SkDevice.h File include/core/SkDevice.h (right): https://codereview.chromium.org/199413013/diff/140002/include/core/SkDevice.h#newcode378 include/core/SkDevice.h:378: * Implements readPixels API. The caller will ensure ...
6 years, 9 months ago (2014-03-24 15:31:36 UTC) #18
reed1
https://codereview.chromium.org/199413013/diff/140002/include/core/SkDevice.h File include/core/SkDevice.h (right): https://codereview.chromium.org/199413013/diff/140002/include/core/SkDevice.h#newcode378 include/core/SkDevice.h:378: * Implements readPixels API. The caller will ensure that: ...
6 years, 9 months ago (2014-03-24 15:53:05 UTC) #19
scroggo
https://codereview.chromium.org/199413013/diff/140002/bench/PremulAndUnpremulAlphaOpsBench.cpp File bench/PremulAndUnpremulAlphaOpsBench.cpp (right): https://codereview.chromium.org/199413013/diff/140002/bench/PremulAndUnpremulAlphaOpsBench.cpp#newcode39 bench/PremulAndUnpremulAlphaOpsBench.cpp:39: *fBmp1.getAddr32(w, h) = SkColorSetARGB(h & 0xFF, w & 0xFF, ...
6 years, 5 months ago (2014-07-11 15:21:25 UTC) #20
bsalomon
https://codereview.chromium.org/199413013/diff/140002/bench/PremulAndUnpremulAlphaOpsBench.cpp File bench/PremulAndUnpremulAlphaOpsBench.cpp (right): https://codereview.chromium.org/199413013/diff/140002/bench/PremulAndUnpremulAlphaOpsBench.cpp#newcode39 bench/PremulAndUnpremulAlphaOpsBench.cpp:39: *fBmp1.getAddr32(w, h) = SkColorSetARGB(h & 0xFF, w & 0xFF, ...
6 years, 5 months ago (2014-07-11 15:30:40 UTC) #21
scroggo
On 2014/07/11 15:30:40, bsalomon wrote: > https://codereview.chromium.org/199413013/diff/140002/bench/PremulAndUnpremulAlphaOpsBench.cpp > File bench/PremulAndUnpremulAlphaOpsBench.cpp (right): > > https://codereview.chromium.org/199413013/diff/140002/bench/PremulAndUnpremulAlphaOpsBench.cpp#newcode39 > ...
6 years, 5 months ago (2014-07-11 15:36:26 UTC) #22
scroggo
6 years, 5 months ago (2014-07-11 17:16:25 UTC) #23
Message was sent while issue was closed.
On 2014/07/11 15:36:26, scroggo wrote:
> On 2014/07/11 15:30:40, bsalomon wrote:
> >
>
https://codereview.chromium.org/199413013/diff/140002/bench/PremulAndUnpremul...
> > File bench/PremulAndUnpremulAlphaOpsBench.cpp (right):
> > 
> >
>
https://codereview.chromium.org/199413013/diff/140002/bench/PremulAndUnpremul...
> > bench/PremulAndUnpremulAlphaOpsBench.cpp:39: *fBmp1.getAddr32(w, h) =
> > SkColorSetARGB(h & 0xFF, w & 0xFF, w & 0xFF, w & 0xFF);
> > On 2014/07/11 15:21:25, scroggo wrote:
> > > Can't this result in an invalid premultiplied color? e.g. for the upper
> right
> > > hand corner (w=W-1, h=0), the color will be:
> > > 
> > > a=0, r=255, g=255, h=255
> > > 
> > > I'm guessing this is the cause of
> > >
> >
>
http://108.170.220.120:10117/builders/Test-Ubuntu12-ShuttleA-GTX660-x86-Debug...
> > 
> > Yeah, I think the intention was for bmp1 to be unpremul and bmp2 to be
premul.
> > That would make the comments in the onDraw() loop make sense.
> 
> In that case, shouldn't we be setting the SkColorType of bmp1 to kUnpremul?
(It
> also seems like the way we're
> using SkColorSetARGB is a hack, since we don't actually want an SkColor.) I'm
> wondering if Mike's change in
> https://codereview.chromium.org/377303002/ had a side effect of attempting to
do
> a draw, exposing a bug in
> this test.

Uploaded a fix in https://codereview.chromium.org/382243005/

Powered by Google App Engine
This is Rietveld 408576698