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

Issue 2089583002: fix size check for drawBitmap fast-path in SkBitmapDevice::drawBitmapRect (Closed)

Created:
4 years, 6 months ago by lsalzman1
Modified:
3 years, 8 months ago
Reviewers:
caryclark, reed1
CC:
reviews_skia.org, hcm
Base URL:
https://skia.googlesource.com/skia@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Fix the size check for the drawBitmap fast-path in SkBitmapDevice::drawBitmapRect. It would fail when the source rectangle had a non-zero offset, in which case it would compare the source rectangle with the offset to the extracted bitmap size, which always fails. The only thing that should matter is that the source rectangle and extract bitmap have the same size, since the offset gets added onto the matrix. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2089583002 Review-Url: https://codereview.chromium.org/2089583002 Committed: https://skia.googlesource.com/skia/+/ea9bc0c07b5dae78a9a449d7d7a07fc79262d41a Review-Url: https://codereview.chromium.org/2089583002 Committed: https://skia.googlesource.com/skia/+/c0e52f44aac391da632d88d9702aea4f41cfe17a

Patch Set 1 #

Patch Set 2 : check extracted offset in SkBitmapDevice::drawBitmapRect size check #

Patch Set 3 : guard new drawBitmapRect offset behavior with SK_DRAWBITMAPRECT_FAST_OFFSET ifdef #

Total comments: 1

Patch Set 4 : make !SK_DRAWBITMAPRECT_FAST_OFFSET case use original code #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -0 lines) Patch
M src/core/SkBitmapDevice.cpp View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 52 (23 generated)
lsalzman1
4 years, 6 months ago (2016-06-21 01:54:21 UTC) #4
reed1
Is this motivate by correctness or performance or something else? I'm seeing several GMs draw ...
4 years, 6 months ago (2016-06-21 15:35:26 UTC) #5
jmuizelaar
On 2016/06/21 15:35:26, reed1 wrote: > Is this motivate by correctness or performance or something ...
4 years, 6 months ago (2016-06-21 15:52:46 UTC) #6
reed1
Just reran this, and got some GM differences, especially in bleed_alpha_bmp_shader. Are these expected?
3 years, 9 months ago (2017-03-05 23:52:33 UTC) #11
lsalzman1
On 2017/03/05 23:52:33, reed1 wrote: > Just reran this, and got some GM differences, especially ...
3 years, 9 months ago (2017-03-07 19:11:02 UTC) #12
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
3 years, 9 months ago (2017-03-07 19:14:48 UTC) #15
lsalzman1
On 2017/03/07 19:14:48, commit-bot: I haz the power wrote: > Note for Reviewers: > The ...
3 years, 9 months ago (2017-03-10 16:40:01 UTC) #18
lsalzman1
On 2017/03/10 16:40:01, lsalzman1 wrote: > On 2017/03/07 19:14:48, commit-bot: I haz the power wrote: ...
3 years, 9 months ago (2017-03-22 18:52:17 UTC) #19
caryclark
Sorry about dropping the ball on this. I'm a bit confused by the conversation up ...
3 years, 9 months ago (2017-03-27 16:56:20 UTC) #21
lsalzman1
On 2017/03/27 16:56:20, caryclark wrote: > Sorry about dropping the ball on this. > > ...
3 years, 8 months ago (2017-03-29 21:22:00 UTC) #22
caryclark
On 2017/03/29 21:22:00, lsalzman1 wrote: > On 2017/03/27 16:56:20, caryclark wrote: > > Sorry about ...
3 years, 8 months ago (2017-03-30 12:16:59 UTC) #23
lsalzman1
On 2017/03/30 12:16:59, caryclark wrote: > On 2017/03/29 21:22:00, lsalzman1 wrote: > > On 2017/03/27 ...
3 years, 8 months ago (2017-03-30 20:22:22 UTC) #24
caryclark
Thanks for the additional explanation. Does this CL remove the need for your workarounds, or ...
3 years, 8 months ago (2017-03-30 20:30:37 UTC) #25
lsalzman1
On 2017/03/30 20:30:37, caryclark wrote: > Thanks for the additional explanation. > > Does this ...
3 years, 8 months ago (2017-03-31 18:21:02 UTC) #26
caryclark
Since this does change some GM results, the change may need to be wrapped to ...
3 years, 8 months ago (2017-03-31 18:28:59 UTC) #27
caryclark
This is the result of running nanobench without, and then with, this CL. The median ...
3 years, 8 months ago (2017-03-31 18:47:54 UTC) #28
caryclark
lgtm Ran chrome layout tests with and without change and saw no meaningful difference.
3 years, 8 months ago (2017-03-31 20:08:34 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2089583002/20001
3 years, 8 months ago (2017-03-31 20:09:23 UTC) #31
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/ea9bc0c07b5dae78a9a449d7d7a07fc79262d41a
3 years, 8 months ago (2017-03-31 20:46:55 UTC) #34
mtklein_C
A revert of this CL (patchset #2 id:20001) has been created in https://codereview.chromium.org/2787263005/ by mtklein@chromium.org. ...
3 years, 8 months ago (2017-04-01 01:36:29 UTC) #35
caryclark
Please bracket your change in an #ifdef so that it can be checked-in with the ...
3 years, 8 months ago (2017-04-03 11:40:07 UTC) #36
lsalzman1
On 2017/04/03 11:40:07, caryclark wrote: > Please bracket your change in an #ifdef so that ...
3 years, 8 months ago (2017-04-04 18:48:58 UTC) #37
caryclark
The difference between the two styles is whether the fix should be on in Skia ...
3 years, 8 months ago (2017-04-05 13:42:04 UTC) #38
caryclark
> Your style (which is fine) will only benefit clients that enable your code explicitly.
3 years, 8 months ago (2017-04-05 13:42:35 UTC) #39
caryclark
https://codereview.chromium.org/2089583002/diff/40001/src/core/SkBitmapDevice.cpp File src/core/SkBitmapDevice.cpp (right): https://codereview.chromium.org/2089583002/diff/40001/src/core/SkBitmapDevice.cpp#newcode310 src/core/SkBitmapDevice.cpp:310: SkRect extractedBitmapBounds = SkRect::MakeIWH(bitmapPtr->width(), bitmapPtr->height()); Can you change this ...
3 years, 8 months ago (2017-04-05 16:59:47 UTC) #43
lsalzman1
On 2017/04/05 16:59:47, caryclark wrote: > https://codereview.chromium.org/2089583002/diff/40001/src/core/SkBitmapDevice.cpp > File src/core/SkBitmapDevice.cpp (right): > > https://codereview.chromium.org/2089583002/diff/40001/src/core/SkBitmapDevice.cpp#newcode310 > ...
3 years, 8 months ago (2017-04-05 19:14:30 UTC) #46
caryclark
lgtm
3 years, 8 months ago (2017-04-05 19:16:30 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2089583002/60001
3 years, 8 months ago (2017-04-06 04:12:16 UTC) #49
commit-bot: I haz the power
3 years, 8 months ago (2017-04-06 04:42:59 UTC) #52
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://skia.googlesource.com/skia/+/c0e52f44aac391da632d88d9702aea4f41cfe17a

Powered by Google App Engine
This is Rietveld 408576698