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

Issue 1272713005: flag to use const& instead of const* for src-rect (Closed)

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

Description

flag to use const& instead of const* for src-rect BUG=skia: Committed: https://skia.googlesource.com/skia/+/e47829b6b1eeb6b0c97ccb3df3016d197046824c Phase Two : change virtual sigantures to const& and remove legacy_ helpers

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : #

Total comments: 1

Patch Set 4 : #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+173 lines, -88 lines) Patch
M bench/BitmapRectBench.cpp View 1 chunk +1 line, -1 line 0 comments Download
M gm/bigtileimagefilter.cpp View 1 chunk +1 line, -1 line 0 comments Download
M gm/bitmaprect.cpp View 4 chunks +5 lines, -5 lines 0 comments Download
M gm/bitmaprecttest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M gm/bleed.cpp View 6 chunks +7 lines, -7 lines 0 comments Download
M gm/drawbitmaprect.cpp View 1 chunk +1 line, -4 lines 0 comments Download
M gm/image.cpp View 2 chunks +5 lines, -5 lines 1 comment Download
M gm/mipmap.cpp View 1 chunk +1 line, -1 line 0 comments Download
M gm/verylargebitmap.cpp View 1 chunk +1 line, -1 line 0 comments Download
M gyp/skia_for_android_framework_defines.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M include/core/SkCanvas.h View 4 chunks +40 lines, -14 lines 0 comments Download
M samplecode/SampleAtlas.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M samplecode/SampleBitmapRect.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M samplecode/SampleTextureDomain.cpp View 3 chunks +4 lines, -4 lines 0 comments Download
M src/c/sk_surface.cpp View 2 chunks +10 lines, -5 lines 1 comment Download
M src/core/SkCanvas.cpp View 4 chunks +66 lines, -8 lines 1 comment Download
M src/core/SkPicturePlayback.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/core/SkRecordDraw.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M src/effects/SkBitmapSource.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/effects/SkTestImageFilters.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M src/gpu/GrRecordReplaceDraw.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/pipe/SkGPipeRead.cpp View 2 chunks +2 lines, -2 lines 1 comment Download
M src/utils/SkDeferredCanvas.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/utils/SkLua.cpp View 1 chunk +1 line, -1 line 1 comment Download
M src/utils/SkNWayCanvas.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M src/utils/android/SkAndroidSDKCanvas.cpp View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/utils/debugger/SkDrawCommand.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M tests/PictureTest.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M tests/RecordDrawTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tests/RecorderTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M tests/SurfaceTest.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 24 (10 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1272713005/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1272713005/1
5 years, 4 months ago (2015-08-06 15:47:51 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: skia_presubmit-Trybot on client.skia.fyi (JOB_FAILED, http://build.chromium.org/p/client.skia.fyi/builders/skia_presubmit-Trybot/builds/1672)
5 years, 4 months ago (2015-08-06 15:48:58 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1272713005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1272713005/20001
5 years, 4 months ago (2015-08-06 16:12:04 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-06 16:19:06 UTC) #8
reed1
5 years, 4 months ago (2015-08-06 16:39:17 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1272713005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1272713005/40001
5 years, 4 months ago (2015-08-06 16:39:37 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot on client.skia (JOB_FAILED, http://build.chromium.org/p/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared-Trybot/builds/2438) Build-Ubuntu-Clang-x86_64-Debug-Trybot on ...
5 years, 4 months ago (2015-08-06 16:40:18 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1272713005/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1272713005/60001
5 years, 4 months ago (2015-08-06 16:42:26 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 4 months ago (2015-08-06 16:49:28 UTC) #18
f(malita)
lgtm https://codereview.chromium.org/1272713005/diff/40001/include/core/SkCanvas.h File include/core/SkCanvas.h (right): https://codereview.chromium.org/1272713005/diff/40001/include/core/SkCanvas.h#newcode41 include/core/SkCanvas.h:41: //#define SK_SUPPORT_LEGACY_SRCPTR_DRAWIMAGERECT Nit: forgot to delete these?
5 years, 4 months ago (2015-08-06 16:57:31 UTC) #19
reed1
On 2015/08/06 16:57:31, f(malita) wrote: > lgtm > > https://codereview.chromium.org/1272713005/diff/40001/include/core/SkCanvas.h > File include/core/SkCanvas.h (right): > ...
5 years, 4 months ago (2015-08-06 17:01:42 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1272713005/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1272713005/60001
5 years, 4 months ago (2015-08-06 17:02:14 UTC) #22
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://skia.googlesource.com/skia/+/e47829b6b1eeb6b0c97ccb3df3016d197046824c
5 years, 4 months ago (2015-08-06 17:02:57 UTC) #23
robertphillips
5 years, 4 months ago (2015-08-06 17:23:00 UTC) #24
Message was sent while issue was closed.
lgtm + suggestions

https://codereview.chromium.org/1272713005/diff/60001/gm/image.cpp
File gm/image.cpp (right):

https://codereview.chromium.org/1272713005/diff/60001/gm/image.cpp#newcode239
gm/image.cpp:239: SkRect dstR = SkRect::MakeWH(SkIntToScalar(newW),
SkIntToScalar(newH));
SkRect srcR = SkRect::MakeWH(image->width(), image->height());

and do away with the 'legacy_' call?

https://codereview.chromium.org/1272713005/diff/60001/src/c/sk_surface.cpp
File src/c/sk_surface.cpp (right):

https://codereview.chromium.org/1272713005/diff/60001/src/c/sk_surface.cpp#ne...
src/c/sk_surface.cpp:394: 
Hmmm, we don't want to make the C-api match ?

https://codereview.chromium.org/1272713005/diff/60001/src/core/SkCanvas.cpp
File src/core/SkCanvas.cpp (right):

https://codereview.chromium.org/1272713005/diff/60001/src/core/SkCanvas.cpp#n...
src/core/SkCanvas.cpp:1913: }
We don't want to change onDrawBitmapRect too?

https://codereview.chromium.org/1272713005/diff/60001/src/pipe/SkGPipeRead.cpp
File src/pipe/SkGPipeRead.cpp (right):

https://codereview.chromium.org/1272713005/diff/60001/src/pipe/SkGPipeRead.cp...
src/pipe/SkGPipeRead.cpp:639: bool hasSrc = SkToBool(flags &
kDrawBitmap_HasSrcRect_DrawOpFlag);
Could we write/read the bitmap/image earlier and then do the :

SkRect src = SkRect::MakeWH(bitmap->width(), bitmap->height());

here (and then remove the 'legacy_' call) ?

https://codereview.chromium.org/1272713005/diff/60001/src/utils/SkLua.cpp
File src/utils/SkLua.cpp (right):

https://codereview.chromium.org/1272713005/diff/60001/src/utils/SkLua.cpp#new...
src/utils/SkLua.cpp:533: }
else {
    srcR = SkRect::MakeWH(image->width(), image->height());
}

Powered by Google App Engine
This is Rietveld 408576698