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

Issue 52703003: Add SkRRect::transform. (Closed)

Created:
7 years, 1 month ago by scroggo
Modified:
7 years, 1 month ago
Reviewers:
robertphillips, reed1
CC:
skia-review_googlegroups.com
Visibility:
Public.

Description

Add SkRRect::transform. Much like SkPath::transform, it transforms an SkRRect based on an SkMatrix. Unlike SkPath::transform, it will fail for matrices that contain perspective or skewing. Required by a future change (https://codereview.chromium.org/48623006) to speed up drawing large blurry rounded rectangles by using ninepatches. TODO: This could easily support 90 degree rotations, if desired. BUG=https://b.corp.google.com/issue?id=11174385 R=reed@google.com, robertphillips@google.com Committed: https://code.google.com/p/skia/source/detail?r=12132

Patch Set 1 #

Total comments: 8

Patch Set 2 : Fix negative scaling bug and add a test. #

Total comments: 10

Patch Set 3 : Fix some lines that were over 100 chars. #

Patch Set 4 : Fix negative scales and don't violate constness. #

Patch Set 5 : Fix a comment. Use taller RRect. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+294 lines, -2 lines) Patch
M include/core/SkRRect.h View 1 2 3 2 chunks +12 lines, -0 lines 2 comments Download
M src/core/SkRRect.cpp View 1 2 3 2 chunks +78 lines, -0 lines 0 comments Download
M tests/RoundRectTest.cpp View 1 2 3 4 3 chunks +204 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
scroggo
7 years, 1 month ago (2013-10-30 23:03:52 UTC) #1
robertphillips
Questions https://codereview.chromium.org/52703003/diff/1/include/core/SkRRect.h File include/core/SkRRect.h (right): https://codereview.chromium.org/52703003/diff/1/include/core/SkRRect.h#newcode285 include/core/SkRRect.h:285: * scale and/or translate, or this call will ...
7 years, 1 month ago (2013-10-30 23:55:02 UTC) #2
scroggo
New patch fixes negative scaling and adds a test. https://codereview.chromium.org/52703003/diff/1/include/core/SkRRect.h File include/core/SkRRect.h (right): https://codereview.chromium.org/52703003/diff/1/include/core/SkRRect.h#newcode285 include/core/SkRRect.h:285: ...
7 years, 1 month ago (2013-10-31 17:40:34 UTC) #3
robertphillips
https://codereview.chromium.org/52703003/diff/70001/tests/RoundRectTest.cpp File tests/RoundRectTest.cpp (right): https://codereview.chromium.org/52703003/diff/70001/tests/RoundRectTest.cpp#newcode457 tests/RoundRectTest.cpp:457: const SkMatrix& matrix) { This comment seems to contradict ...
7 years, 1 month ago (2013-10-31 18:25:26 UTC) #4
scroggo
https://codereview.chromium.org/52703003/diff/70001/tests/RoundRectTest.cpp File tests/RoundRectTest.cpp (right): https://codereview.chromium.org/52703003/diff/70001/tests/RoundRectTest.cpp#newcode457 tests/RoundRectTest.cpp:457: const SkMatrix& matrix) { On 2013/10/31 18:25:26, robertphillips wrote: ...
7 years, 1 month ago (2013-10-31 19:20:10 UTC) #5
robertphillips
lgtm
7 years, 1 month ago (2013-10-31 21:42:44 UTC) #6
scroggo
On 2013/10/31 21:42:44, robertphillips wrote: > lgtm Mike, can you take a look for the ...
7 years, 1 month ago (2013-11-01 22:03:04 UTC) #7
reed1
lgtm btw -- we *could* support 90-degree rotations, and then we could just use matrix::rectStaysRect() ...
7 years, 1 month ago (2013-11-04 20:21:09 UTC) #8
scroggo
On 2013/11/04 20:21:09, reed1 wrote: > btw -- we *could* support 90-degree rotations, and then ...
7 years, 1 month ago (2013-11-04 22:29:55 UTC) #9
robertphillips
If we do want to go with the self-modifying API we should get rid of ...
7 years, 1 month ago (2013-11-05 14:15:07 UTC) #10
scroggo
7 years, 1 month ago (2013-11-05 15:54:48 UTC) #11
Message was sent while issue was closed.
Committed patchset #5 manually as r12132 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698