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

Issue 2205273003: Add onDrawBitmapLattice(), avoid unnecessary bitmap->image copy (Closed)

Created:
4 years, 4 months ago by msarett
Modified:
4 years, 4 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@copypaste
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Add onDrawBitmapLattice(), avoid unnecessary bitmap->image copy out/Release/nanobench --match Lattice --config gpu --ms 3000 3.42ms -> 17.2us For reference, a loop over drawBitmapRects (which is what Android currently does) is about 13us. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2205273003 Committed: https://skia.googlesource.com/skia/+/168820625c35a8c19f66c661efcbce7a5e334837

Patch Set 1 #

Total comments: 9

Patch Set 2 : Move bitmap virtual into SkBaseDevice #

Total comments: 5

Patch Set 3 : Implement SkBaseDevice::drawBitmapLattice() with a loop #

Patch Set 4 : Rebase #

Patch Set 5 : Add support for SkLiteRecorder #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -82 lines) Patch
M include/core/SkCanvas.h View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M include/core/SkDevice.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 4 chunks +63 lines, -35 lines 0 comments Download
M src/core/SkDevice.cpp View 1 2 3 chunks +23 lines, -11 lines 0 comments Download
M src/core/SkLiteDL.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M src/core/SkLiteDL.cpp View 1 2 3 4 1 chunk +9 lines, -0 lines 3 comments Download
M src/core/SkLiteRecorder.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M src/core/SkLiteRecorder.cpp View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M src/core/SkPictureRecord.h View 1 2 3 2 chunks +7 lines, -2 lines 0 comments Download
M src/core/SkPictureRecord.cpp View 1 2 3 2 chunks +18 lines, -18 lines 0 comments Download
M src/core/SkRecorder.h View 1 chunk +4 lines, -2 lines 0 comments Download
M src/core/SkRecorder.cpp View 2 chunks +13 lines, -10 lines 0 comments Download
M src/pdf/SkPDFCanvas.h View 1 1 chunk +7 lines, -2 lines 0 comments Download
M src/pdf/SkPDFCanvas.cpp View 1 1 chunk +12 lines, -0 lines 2 comments Download

Depends on Patchset:

Messages

Total messages: 40 (21 generated)
msarett
https://codereview.chromium.org/2205273003/diff/40001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/2205273003/diff/40001/src/core/SkCanvas.cpp#newcode1996 src/core/SkCanvas.cpp:1996: void SkCanvas::drawImageLattice(const SkImage* image, const Lattice& lattice, const SkRect& ...
4 years, 4 months ago (2016-08-03 15:07:57 UTC) #7
mtklein
https://codereview.chromium.org/2205273003/diff/40001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/2205273003/diff/40001/src/core/SkCanvas.cpp#newcode2556 src/core/SkCanvas.cpp:2556: void SkCanvas::onDrawBitmapLattice(const SkBitmap& bitmap, const Lattice& lattice, On 2016/08/03 ...
4 years, 4 months ago (2016-08-03 15:11:51 UTC) #8
mtklein
https://codereview.chromium.org/2205273003/diff/40001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/2205273003/diff/40001/src/core/SkCanvas.cpp#newcode2556 src/core/SkCanvas.cpp:2556: void SkCanvas::onDrawBitmapLattice(const SkBitmap& bitmap, const Lattice& lattice, On 2016/08/03 ...
4 years, 4 months ago (2016-08-03 15:12:19 UTC) #9
reed1
also agree to use SkMakeRasterImage... instead of needing to expose image_raster header https://codereview.chromium.org/2205273003/diff/40001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp ...
4 years, 4 months ago (2016-08-03 15:21:06 UTC) #10
msarett
https://codereview.chromium.org/2205273003/diff/40001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/2205273003/diff/40001/src/core/SkCanvas.cpp#newcode2556 src/core/SkCanvas.cpp:2556: void SkCanvas::onDrawBitmapLattice(const SkBitmap& bitmap, const Lattice& lattice, On 2016/08/03 ...
4 years, 4 months ago (2016-08-03 15:49:23 UTC) #11
reed1
https://codereview.chromium.org/2205273003/diff/60001/src/core/SkDevice.cpp File src/core/SkDevice.cpp (right): https://codereview.chromium.org/2205273003/diff/60001/src/core/SkDevice.cpp#newcode200 src/core/SkDevice.cpp:200: sk_sp<SkImage> image = SkMakeImageFromRasterBitmap(bitmap, kNever_ForceCopyMode); Since this trick with ...
4 years, 4 months ago (2016-08-15 20:34:44 UTC) #12
msarett
https://codereview.chromium.org/2205273003/diff/60001/src/core/SkDevice.cpp File src/core/SkDevice.cpp (right): https://codereview.chromium.org/2205273003/diff/60001/src/core/SkDevice.cpp#newcode200 src/core/SkDevice.cpp:200: sk_sp<SkImage> image = SkMakeImageFromRasterBitmap(bitmap, kNever_ForceCopyMode); On 2016/08/15 20:34:43, reed1 ...
4 years, 4 months ago (2016-08-15 20:43:03 UTC) #13
msarett
Added overrides for SkLiteRecorder
4 years, 4 months ago (2016-08-15 22:17:15 UTC) #24
mtklein
The Lite stuff lgtm.
4 years, 4 months ago (2016-08-15 23:14:59 UTC) #27
reed1
lgtm w/ minor suggestions/questions https://codereview.chromium.org/2205273003/diff/120001/src/core/SkLiteDL.cpp File src/core/SkLiteDL.cpp (right): https://codereview.chromium.org/2205273003/diff/120001/src/core/SkLiteDL.cpp#newcode629 src/core/SkLiteDL.cpp:629: int xs = lattice.fXCount, ys ...
4 years, 4 months ago (2016-08-16 11:28:47 UTC) #28
mtklein
https://codereview.chromium.org/2205273003/diff/120001/src/core/SkLiteDL.cpp File src/core/SkLiteDL.cpp (right): https://codereview.chromium.org/2205273003/diff/120001/src/core/SkLiteDL.cpp#newcode629 src/core/SkLiteDL.cpp:629: int xs = lattice.fXCount, ys = lattice.fYCount; On 2016/08/16 ...
4 years, 4 months ago (2016-08-16 12:36:05 UTC) #29
reed1
On 2016/08/16 12:36:05, mtklein wrote: > https://codereview.chromium.org/2205273003/diff/120001/src/core/SkLiteDL.cpp > File src/core/SkLiteDL.cpp (right): > > https://codereview.chromium.org/2205273003/diff/120001/src/core/SkLiteDL.cpp#newcode629 > ...
4 years, 4 months ago (2016-08-16 13:39:02 UTC) #30
mtklein
On 2016/08/16 13:39:02, reed1 wrote: > On 2016/08/16 12:36:05, mtklein wrote: > > https://codereview.chromium.org/2205273003/diff/120001/src/core/SkLiteDL.cpp > ...
4 years, 4 months ago (2016-08-16 13:48:24 UTC) #31
reed1
On 2016/08/16 13:48:24, mtklein wrote: > On 2016/08/16 13:39:02, reed1 wrote: > > On 2016/08/16 ...
4 years, 4 months ago (2016-08-16 13:57:21 UTC) #32
msarett
https://codereview.chromium.org/2205273003/diff/120001/src/core/SkLiteDL.cpp File src/core/SkLiteDL.cpp (right): https://codereview.chromium.org/2205273003/diff/120001/src/core/SkLiteDL.cpp#newcode629 src/core/SkLiteDL.cpp:629: int xs = lattice.fXCount, ys = lattice.fYCount; On 2016/08/16 ...
4 years, 4 months ago (2016-08-16 14:45:37 UTC) #34
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/2205273003/120001
4 years, 4 months ago (2016-08-16 14:48:06 UTC) #36
hal.canary
https://codereview.chromium.org/2205273003/diff/120001/src/pdf/SkPDFCanvas.cpp File src/pdf/SkPDFCanvas.cpp (right): https://codereview.chromium.org/2205273003/diff/120001/src/pdf/SkPDFCanvas.cpp#newcode99 src/pdf/SkPDFCanvas.cpp:99: void SkPDFCanvas::onDrawBitmapLattice(const SkBitmap& bitmap, On 2016/08/16 11:28:47, reed1 wrote: ...
4 years, 4 months ago (2016-08-16 14:57:33 UTC) #37
hal.canary
PDF: LGTM
4 years, 4 months ago (2016-08-16 14:58:41 UTC) #38
commit-bot: I haz the power
4 years, 4 months ago (2016-08-16 16:31:12 UTC) #40
Message was sent while issue was closed.
Committed patchset #5 (id:120001) as
https://skia.googlesource.com/skia/+/168820625c35a8c19f66c661efcbce7a5e334837

Powered by Google App Engine
This is Rietveld 408576698