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

Issue 424663006: SkCanvas interface for drawing a patch. (Closed)

Created:
6 years, 4 months ago by dandov
Modified:
6 years, 4 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Project:
skia
Visibility:
Public.

Description

SkCanvas interface for drawing a patch. Added function SkCanvas::drawPatch to the API. This function receives the patch to draw and the paint. Added function SkBaseDevice::drawPatch to the API. This function also receives the patch to draw and the paint. Currently SkGpuDevice and SkBitmapDevice generate the mesh taking into account the scale factor and call the corresponding device's drawVertices. BUG=skia: Committed: https://skia.googlesource.com/skia/+/ecfff21bde1f0ca3c36533eded325066b5f2d42d

Patch Set 1 #

Total comments: 5

Patch Set 2 : Default implementation of SkBaseDevice::drawPatch #

Patch Set 3 : Added array constructor for FwDCubicEvaluator #

Total comments: 7

Patch Set 4 : Approx arc length for LOD and improved GM tests #

Total comments: 10

Patch Set 5 : Added SkPatchUtils #

Total comments: 4

Patch Set 6 : Renamed static functions #

Total comments: 4

Patch Set 7 : Moved SkPatchUtils.h to src/utils, moved partition size and approx_arc_length to SkPatchUtils.cpp #

Total comments: 1

Patch Set 8 : Use SkISize #

Patch Set 9 : Fixed fail because of implicit casting warning. #

Patch Set 10 : Fixed implicit casting in patch.cpp #

Unified diffs Side-by-side diffs Delta from patch set Stats (+314 lines, -122 lines) Patch
M gm/patch.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +88 lines, -58 lines 0 comments Download
M gyp/utils.gypi View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkCanvas.h View 2 chunks +3 lines, -0 lines 0 comments Download
M include/core/SkDevice.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M include/core/SkPatch.h View 1 2 3 4 3 chunks +31 lines, -9 lines 0 comments Download
M include/utils/SkDeferredCanvas.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 2 3 4 5 6 7 1 chunk +19 lines, -0 lines 0 comments Download
M src/core/SkDevice.cpp View 1 2 3 4 5 6 7 2 chunks +13 lines, -0 lines 0 comments Download
M src/core/SkPatch.cpp View 1 2 3 5 chunks +69 lines, -55 lines 0 comments Download
M src/utils/SkDeferredCanvas.cpp View 2 chunks +6 lines, -0 lines 0 comments Download
A src/utils/SkPatchUtils.h View 1 2 3 4 5 6 7 1 chunk +23 lines, -0 lines 0 comments Download
A src/utils/SkPatchUtils.cpp View 1 2 3 4 5 6 7 8 1 chunk +57 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
dandov
https://codereview.chromium.org/424663006/diff/1/gm/patch.cpp File gm/patch.cpp (right): https://codereview.chromium.org/424663006/diff/1/gm/patch.cpp#newcode40 gm/patch.cpp:40: return kSkipTiled_Flag | kSkipPipe_Flag | kSkipPicture_Flag; Added this flags ...
6 years, 4 months ago (2014-07-28 15:50:56 UTC) #1
bsalomon
https://codereview.chromium.org/424663006/diff/1/src/core/SkBitmapDevice.cpp File src/core/SkBitmapDevice.cpp (right): https://codereview.chromium.org/424663006/diff/1/src/core/SkBitmapDevice.cpp#newcode348 src/core/SkBitmapDevice.cpp:348: patch.getVertexData(&data, draw.fMatrix->getScaleX() * 10, draw.fMatrix->getScaleY() * 10); I don't ...
6 years, 4 months ago (2014-07-28 20:56:26 UTC) #2
dandov
Added a default implementation in SkBaseDevice::drawPatch, this takes into account the size of the patch ...
6 years, 4 months ago (2014-07-29 18:45:46 UTC) #3
dandov
Fixed some issues I found while working with the mesh gradients.
6 years, 4 months ago (2014-07-31 13:18:40 UTC) #4
jvanverth1
LGTM, but I think bsalomon needs to approve.
6 years, 4 months ago (2014-07-31 15:52:51 UTC) #5
bsalomon
https://codereview.chromium.org/424663006/diff/40001/gm/patch.cpp File gm/patch.cpp (right): https://codereview.chromium.org/424663006/diff/40001/gm/patch.cpp#newcode58 gm/patch.cpp:58: canvas->scale(1.3f, 1.f); Might need some more test cases here ...
6 years, 4 months ago (2014-07-31 17:39:06 UTC) #6
dandov
Fixed the level of detail issue, added some extra transformations for the patches in the ...
6 years, 4 months ago (2014-07-31 21:35:40 UTC) #7
egdaniel
https://codereview.chromium.org/424663006/diff/60001/src/core/SkDevice.cpp File src/core/SkDevice.cpp (right): https://codereview.chromium.org/424663006/diff/60001/src/core/SkDevice.cpp#newcode88 src/core/SkDevice.cpp:88: int topLength = SkSqrt32(mapPts[SkPatch::kTopP0_CubicCtrlPts] This may be a good ...
6 years, 4 months ago (2014-08-01 13:28:52 UTC) #8
bsalomon
https://codereview.chromium.org/424663006/diff/60001/gm/patch.cpp File gm/patch.cpp (right): https://codereview.chromium.org/424663006/diff/60001/gm/patch.cpp#newcode19 gm/patch.cpp:19: void drawControlPoints(SkCanvas* canvas, SkPatch& patch, SkPaint& paint) { static ...
6 years, 4 months ago (2014-08-01 13:30:28 UTC) #9
dandov
Added SkPatchUtils class to handle some of the operations related to a SkPatch, I realized ...
6 years, 4 months ago (2014-08-01 15:11:14 UTC) #10
egdaniel
https://codereview.chromium.org/424663006/diff/80001/gm/patch.cpp File gm/patch.cpp (right): https://codereview.chromium.org/424663006/diff/80001/gm/patch.cpp#newcode19 gm/patch.cpp:19: static void drawControlPoints(SkCanvas* canvas, SkPatch& patch, SkPaint& paint) { ...
6 years, 4 months ago (2014-08-01 15:41:41 UTC) #11
dandov
https://codereview.chromium.org/424663006/diff/80001/gm/patch.cpp File gm/patch.cpp (right): https://codereview.chromium.org/424663006/diff/80001/gm/patch.cpp#newcode19 gm/patch.cpp:19: static void drawControlPoints(SkCanvas* canvas, SkPatch& patch, SkPaint& paint) { ...
6 years, 4 months ago (2014-08-01 19:10:51 UTC) #12
bsalomon
https://codereview.chromium.org/424663006/diff/100001/include/utils/SkPatchUtils.h File include/utils/SkPatchUtils.h (right): https://codereview.chromium.org/424663006/diff/100001/include/utils/SkPatchUtils.h#newcode17 include/utils/SkPatchUtils.h:17: static const int kPartitionSize = 30; I'd move this ...
6 years, 4 months ago (2014-08-01 21:02:28 UTC) #13
dandov
https://codereview.chromium.org/424663006/diff/100001/include/utils/SkPatchUtils.h File include/utils/SkPatchUtils.h (right): https://codereview.chromium.org/424663006/diff/100001/include/utils/SkPatchUtils.h#newcode17 include/utils/SkPatchUtils.h:17: static const int kPartitionSize = 30; On 2014/08/01 21:02:28, ...
6 years, 4 months ago (2014-08-01 21:25:01 UTC) #14
bsalomon
https://codereview.chromium.org/424663006/diff/120001/src/utils/SkPatchUtils.h File src/utils/SkPatchUtils.h (right): https://codereview.chromium.org/424663006/diff/120001/src/utils/SkPatchUtils.h#newcode20 src/utils/SkPatchUtils.h:20: static SkIPoint GetLevelOfDetail(const SkPatch& patch, const SkMatrix* matrix); *Maybe* ...
6 years, 4 months ago (2014-08-04 13:22:56 UTC) #15
bsalomon
On 2014/08/04 13:22:56, bsalomon wrote: > https://codereview.chromium.org/424663006/diff/120001/src/utils/SkPatchUtils.h > File src/utils/SkPatchUtils.h (right): > > https://codereview.chromium.org/424663006/diff/120001/src/utils/SkPatchUtils.h#newcode20 > ...
6 years, 4 months ago (2014-08-04 13:23:08 UTC) #16
dandov
The CQ bit was checked by dandov@google.com
6 years, 4 months ago (2014-08-04 14:52:45 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dandov@google.com/424663006/140001
6 years, 4 months ago (2014-08-04 14:53:03 UTC) #18
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Win-VS2013-x86-Debug-Trybot on tryserver.skia ...
6 years, 4 months ago (2014-08-04 15:06:53 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-04 15:14:03 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: Build-Win-VS2013-x86-Debug-Trybot on tryserver.skia (http://108.170.220.76:10117/builders/Build-Win-VS2013-x86-Debug-Trybot/builds/1092)
6 years, 4 months ago (2014-08-04 15:14:03 UTC) #21
dandov
The CQ bit was checked by dandov@google.com
6 years, 4 months ago (2014-08-04 15:15:53 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dandov@google.com/424663006/60002
6 years, 4 months ago (2014-08-04 15:16:03 UTC) #23
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Build-Win-VS2013-x86-Debug-Trybot on tryserver.skia ...
6 years, 4 months ago (2014-08-04 15:29:33 UTC) #24
dandov
The CQ bit was checked by dandov@google.com
6 years, 4 months ago (2014-08-04 15:35:37 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dandov@google.com/424663006/170001
6 years, 4 months ago (2014-08-04 15:36:15 UTC) #26
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-Trybot on tryserver.skia ...
6 years, 4 months ago (2014-08-04 15:49:27 UTC) #27
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-04 16:02:48 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-Trybot on tryserver.skia (http://108.170.220.120:10117/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-Trybot/builds/2)
6 years, 4 months ago (2014-08-04 16:02:50 UTC) #29
dandov
The CQ bit was checked by dandov@google.com
6 years, 4 months ago (2014-08-04 17:01:04 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/dandov@google.com/424663006/170001
6 years, 4 months ago (2014-08-04 17:01:26 UTC) #31
commit-bot: I haz the power
6 years, 4 months ago (2014-08-04 17:02:04 UTC) #32
Message was sent while issue was closed.
Change committed as ecfff21bde1f0ca3c36533eded325066b5f2d42d

Powered by Google App Engine
This is Rietveld 408576698