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

Issue 1290983003: SkImage-only bitmap patterns (Closed)

Created:
5 years, 4 months ago by f(malita)
Modified:
5 years, 4 months ago
Reviewers:
Justin Novosad
CC:
blink-reviews, krit, pdr+graphicswatchlist_chromium.org, drott+blinkwatch_chromium.org, dshwang, jbroman, danakj, Rik, Stephen Chennney, rwlbuis
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

SkImage-only bitmap patterns The current BitmapPatternBase/BitmapPattern/StaticBitmapPattern class hierarchy exists to support SkBitmap vs. SkImage-backed patterns. But with the recent SkImage conversion effort, all Images are now backed by SkImage and BitmapPattern has to go through an unnecessary conversion phase to get its SkBitmap. IOW, this dichotomy is now obsolete. The CL removes BitmapPatternBase, BitmapPattern, StaticBitmapPattern, and replaces them with ImagePattern (which is always/naturally backed by SkImage). Also, since we're in this area, convert the current non-repeating tile mode workaround to a SkPicture-based implementation: instead of allocating/drawing into an expanded bitmap, allocate an expanded SkPictureImageGenerator-backed SkImage and defer the actual tile drawing until rasterization time. BUG=449197 R=junov@chromium.org,senorblanco@chromium.org,reed@google.com Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=200707

Patch Set 1 #

Patch Set 2 : missing adoptRef + misc cleanup #

Total comments: 2

Patch Set 3 : drop non-repeat optimization #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -284 lines) Patch
M Source/modules/canvas2d/CanvasPattern.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/blink_platform.gypi View 3 chunks +2 lines, -6 lines 0 comments Download
D Source/platform/graphics/BitmapPattern.h View 1 chunk +0 lines, -36 lines 0 comments Download
D Source/platform/graphics/BitmapPattern.cpp View 1 chunk +0 lines, -49 lines 0 comments Download
D Source/platform/graphics/BitmapPatternBase.h View 1 chunk +0 lines, -27 lines 0 comments Download
D Source/platform/graphics/BitmapPatternBase.cpp View 1 chunk +0 lines, -65 lines 0 comments Download
A Source/platform/graphics/ImagePattern.h View 1 1 chunk +31 lines, -0 lines 0 comments Download
A Source/platform/graphics/ImagePattern.cpp View 1 2 1 chunk +76 lines, -0 lines 1 comment Download
M Source/platform/graphics/Pattern.h View 1 chunk +1 line, -2 lines 0 comments Download
M Source/platform/graphics/Pattern.cpp View 2 chunks +3 lines, -8 lines 0 comments Download
M Source/platform/graphics/PicturePattern.h View 1 1 chunk +1 line, -1 line 0 comments Download
D Source/platform/graphics/StaticBitmapPattern.h View 1 chunk +0 lines, -32 lines 0 comments Download
D Source/platform/graphics/StaticBitmapPattern.cpp View 1 chunk +0 lines, -57 lines 0 comments Download

Messages

Total messages: 20 (4 generated)
f(malita)
5 years, 4 months ago (2015-08-17 14:53:00 UTC) #1
Justin Novosad
https://codereview.chromium.org/1290983003/diff/20001/Source/platform/graphics/ImagePattern.cpp File Source/platform/graphics/ImagePattern.cpp (right): https://codereview.chromium.org/1290983003/diff/20001/Source/platform/graphics/ImagePattern.cpp#newcode65 Source/platform/graphics/ImagePattern.cpp:65: adoptRef(SkImage::NewFromPicture(tilePicture.get(), tileSize, nullptr, nullptr)); Why is it necessary to ...
5 years, 4 months ago (2015-08-17 15:03:25 UTC) #3
f(malita)
https://codereview.chromium.org/1290983003/diff/20001/Source/platform/graphics/ImagePattern.cpp File Source/platform/graphics/ImagePattern.cpp (right): https://codereview.chromium.org/1290983003/diff/20001/Source/platform/graphics/ImagePattern.cpp#newcode65 Source/platform/graphics/ImagePattern.cpp:65: adoptRef(SkImage::NewFromPicture(tilePicture.get(), tileSize, nullptr, nullptr)); On 2015/08/17 15:03:24, Justin Novosad ...
5 years, 4 months ago (2015-08-17 15:09:30 UTC) #4
Justin Novosad
On 2015/08/17 15:09:30, f(malita) wrote: > https://codereview.chromium.org/1290983003/diff/20001/Source/platform/graphics/ImagePattern.cpp > File Source/platform/graphics/ImagePattern.cpp (right): > > https://codereview.chromium.org/1290983003/diff/20001/Source/platform/graphics/ImagePattern.cpp#newcode65 > ...
5 years, 4 months ago (2015-08-17 16:51:32 UTC) #5
Justin Novosad
> It is a way to avoid record-time rasterization. Not strictly necessary (we > could ...
5 years, 4 months ago (2015-08-17 16:54:02 UTC) #6
f(malita)
On 2015/08/17 16:54:02, Justin Novosad wrote: > > It is a way to avoid record-time ...
5 years, 4 months ago (2015-08-17 17:59:03 UTC) #7
f(malita)
On 2015/08/17 17:59:03, f(malita) wrote: > On 2015/08/17 16:54:02, Justin Novosad wrote: > > I ...
5 years, 4 months ago (2015-08-17 18:51:30 UTC) #8
Justin Novosad
lgtm FWIW, I think the deferred SkPicture rendering approach may not be safe: If the ...
5 years, 4 months ago (2015-08-17 18:53:42 UTC) #9
Justin Novosad
On 2015/08/17 18:53:42, Justin Novosad wrote: > lgtm > > FWIW, I think the deferred ...
5 years, 4 months ago (2015-08-17 19:05:31 UTC) #10
f(malita)
On 2015/08/17 19:05:31, Justin Novosad wrote: > On 2015/08/17 18:53:42, Justin Novosad wrote: > > ...
5 years, 4 months ago (2015-08-17 19:56:13 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1290983003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1290983003/40001
5 years, 4 months ago (2015-08-17 19:58:13 UTC) #13
Justin Novosad
On 2015/08/17 19:56:13, f(malita) wrote: > On 2015/08/17 19:05:31, Justin Novosad wrote: > > On ...
5 years, 4 months ago (2015-08-17 20:04:39 UTC) #14
Justin Novosad
On 2015/08/17 20:04:39, Justin Novosad wrote: > On 2015/08/17 19:56:13, f(malita) wrote: > > On ...
5 years, 4 months ago (2015-08-17 20:06:18 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/99202)
5 years, 4 months ago (2015-08-17 22:33:42 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1290983003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1290983003/40001
5 years, 4 months ago (2015-08-18 05:36:20 UTC) #19
commit-bot: I haz the power
5 years, 4 months ago (2015-08-18 06:49:14 UTC) #20
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=200707

Powered by Google App Engine
This is Rietveld 408576698