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

Issue 733203005: Tweak SkPictureShader's tile semantics. (Closed)

Created:
6 years ago by f(malita)
Modified:
6 years ago
Reviewers:
robertphillips, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

Tweak SkPictureShader's tile semantics. Currently, the tile offset is added when drawing the picture. This might have made a tiny bit of sense when the picture was always positioned at origin, but with a picture cull rect offset things looks really strange. For example, to specify a tile == the picture cull rect we have to pass in [-cullrect.x, -cullrect.y, cullrect.width, cullrect.height]. Yikes. (there's also a bug when not passing a tile, as we use a default tile == cullrect but don't compensate for the above oddity) This changes the semantics of the tile offset: it is now subtracted when drawing the picture tile. As a consequence, one can pass in a tile equal to the cull rect and get the expected behavior (same when not passing a tile). This will require a minor Blink change with the roll, as one client works around the current behavior: https://codereview.chromium.org/789503003 R=reed@google.com,robertphillips@google.com BUG=440046 Committed: https://skia.googlesource.com/skia/+/a2bd24fd15378d0a25d79b4aa2d76dddc4cf564c

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -28 lines) Patch
M gm/pictureshadertile.cpp View 2 chunks +43 lines, -27 lines 3 comments Download
M src/core/SkPictureShader.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 7 (1 generated)
f(malita)
6 years ago (2014-12-08 17:08:31 UTC) #1
reed1
lgtm
6 years ago (2014-12-08 18:12:32 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/733203005/1
6 years ago (2014-12-08 19:11:24 UTC) #4
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://skia.googlesource.com/skia/+/a2bd24fd15378d0a25d79b4aa2d76dddc4cf564c
6 years ago (2014-12-08 19:13:31 UTC) #5
robertphillips
after the fact nits - ignore at will. https://codereview.chromium.org/733203005/diff/1/gm/pictureshadertile.cpp File gm/pictureshadertile.cpp (right): https://codereview.chromium.org/733203005/diff/1/gm/pictureshadertile.cpp#newcode61 gm/pictureshadertile.cpp:61: protected: ...
6 years ago (2014-12-08 20:01:31 UTC) #6
f(malita)
6 years ago (2014-12-08 20:11:37 UTC) #7
Message was sent while issue was closed.
On 2014/12/08 20:01:31, robertphillips wrote:
> after the fact nits - ignore at will.
> 
> https://codereview.chromium.org/733203005/diff/1/gm/pictureshadertile.cpp
> File gm/pictureshadertile.cpp (right):
> 
>
https://codereview.chromium.org/733203005/diff/1/gm/pictureshadertile.cpp#new...
> gm/pictureshadertile.cpp:61: protected:
> rm these virtual keywords?
> 
>
https://codereview.chromium.org/733203005/diff/1/gm/pictureshadertile.cpp#new...
> gm/pictureshadertile.cpp:107:
> fShaders[i].reset(SkShader::CreatePictureShader(picturePtr,
> tab these guys over?
> 
>
https://codereview.chromium.org/733203005/diff/1/gm/pictureshadertile.cpp#new...
> gm/pictureshadertile.cpp:132: private:
> can this be: static void draw_scene ?
> Otherwise the call sites should be: this->drawScene.

Thanks & sorry for rushing the CL in. Will land a followup.

Powered by Google App Engine
This is Rietveld 408576698