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

Issue 2261003003: store info in basedevice, change getter to non-virtual const& (Closed)

Created:
4 years, 4 months ago by reed1
Modified:
4 years, 4 months ago
Reviewers:
bsalomon, f(malita)
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

store info in basedevice, change getter to non-virtual const& The fact that bitmapdevice can be resized at all is somewhat of a hack to all picture-recording to reuse its canvas at different sizes (with the same device to save on allocations). If we can find an alternate solution for that, we can make fInfo truly const. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2261003003 Committed: https://skia.googlesource.com/skia/+/589a39eb81d25fa7af95e7366db17ac7a70a7d03

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -47 lines) Patch
M include/core/SkBitmapDevice.h View 1 chunk +0 lines, -2 lines 0 comments Download
M include/core/SkDevice.h View 3 chunks +9 lines, -3 lines 1 comment Download
M src/core/SkBitmapDevice.cpp View 4 chunks +4 lines, -6 lines 0 comments Download
M src/core/SkDevice.cpp View 2 chunks +4 lines, -5 lines 0 comments Download
M src/gpu/SkGpuDevice.h View 1 chunk +0 lines, -10 lines 0 comments Download
M src/gpu/SkGpuDevice.cpp View 1 chunk +15 lines, -3 lines 0 comments Download
M src/pdf/SkPDFDevice.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/pdf/SkPDFDevice.cpp View 2 chunks +2 lines, -6 lines 0 comments Download
M src/svg/SkSVGDevice.h View 2 chunks +0 lines, -3 lines 0 comments Download
M src/svg/SkSVGDevice.cpp View 2 chunks +3 lines, -7 lines 0 comments Download

Messages

Total messages: 10 (5 generated)
reed1
speeds up simplerect, where imageInfo() is 2-3%
4 years, 4 months ago (2016-08-20 14:06:00 UTC) #3
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/2261003003/1
4 years, 4 months ago (2016-08-20 14:06:13 UTC) #5
bsalomon
lgtm https://codereview.chromium.org/2261003003/diff/1/include/core/SkDevice.h File include/core/SkDevice.h (right): https://codereview.chromium.org/2261003003/diff/1/include/core/SkDevice.h#newcode376 include/core/SkDevice.h:376: *const_cast<SkImageInfo*>(&fInfo) = fInfo.makeWH(w, h); why not just make ...
4 years, 4 months ago (2016-08-20 14:57:29 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://skia.googlesource.com/skia/+/589a39eb81d25fa7af95e7366db17ac7a70a7d03
4 years, 4 months ago (2016-08-20 14:59:22 UTC) #8
reed1
4 years, 4 months ago (2016-08-20 16:22:22 UTC) #10
Message was sent while issue was closed.
On 2016/08/20 14:57:29, bsalomon wrote:
> lgtm
> 
> https://codereview.chromium.org/2261003003/diff/1/include/core/SkDevice.h
> File include/core/SkDevice.h (right):
> 
>
https://codereview.chromium.org/2261003003/diff/1/include/core/SkDevice.h#new...
> include/core/SkDevice.h:376: *const_cast<SkImageInfo*>(&fInfo) =
fInfo.makeWH(w,
> h);
> why not just make it non-const? Also, there's a whole clique of friends up at
> line 343.

I've updated the CL comment. BitmapDevice is only friended for that one call
(guilt by colocation). Hopefully we can find a way to not have resizing at all.

Powered by Google App Engine
This is Rietveld 408576698