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

Issue 335573002: Extract "text align proc" functions as reusable classes (Closed)

Created:
6 years, 6 months ago by Kimmo Kinnunen
Modified:
6 years, 6 months ago
Reviewers:
jvanverth1, reed1
CC:
skia-review_googlegroups.com
Base URL:
https://skia.googlesource.com/skia.git@master
Visibility:
Public.

Description

Extract "text align proc" functions as reusable classes Extract "text align proc" as reusable classes. These classes need to be used when writing GrTextContext subclasses. Moves "text align proc" code that is duplicated in SkDraw and SkBitmapTextContext to SkDrawProcs.h and SkTextMapState.h. This functionality is also used in the new GrStencilAndCoverTextContext. Creates new functor classes SkTextAlignProc and SkTextAlignProcScalar which represent the previous "text align procs". Moves TextMapState from SkDraw to SkTextMapStateProc and make it similar functor. The transform should be comparable in speed, as the compiler can and does avoid the call and eliminate some of the branches. Committed: https://skia.googlesource.com/skia/+/cb9a2c8934f009b6ee1ca73d662ac18b285085d9

Patch Set 1 #

Total comments: 1

Patch Set 2 : address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -238 lines) Patch
M gyp/core.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/core/SkDraw.cpp View 1 9 chunks +22 lines, -132 lines 0 comments Download
M src/core/SkDrawProcs.h View 2 chunks +50 lines, -0 lines 0 comments Download
A src/core/SkTextMapStateProc.h View 1 1 chunk +76 lines, -0 lines 0 comments Download
M src/gpu/GrBitmapTextContext.cpp View 1 7 chunks +18 lines, -106 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Kimmo Kinnunen
Separate commit for easier discussion and review. Perf tries: bench_pictures -r $skps/ --config 8888 --repeat ...
6 years, 6 months ago (2014-06-12 06:20:42 UTC) #1
jvanverth1
lgtm LGTM + comment https://codereview.chromium.org/335573002/diff/1/src/core/SkTextMapState.h File src/core/SkTextMapState.h (right): https://codereview.chromium.org/335573002/diff/1/src/core/SkTextMapState.h#newcode14 src/core/SkTextMapState.h:14: class SkTextMapState { I think ...
6 years, 6 months ago (2014-06-12 14:33:01 UTC) #2
jvanverth1
You may need to add Mike to get permission to change the public interface.
6 years, 6 months ago (2014-06-12 14:37:35 UTC) #3
reed1
lgtm
6 years, 6 months ago (2014-06-12 15:01:41 UTC) #4
Kimmo Kinnunen
The CQ bit was checked by kkinnunen@nvidia.com
6 years, 6 months ago (2014-06-13 05:40:33 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://skia-tree-status.appspot.com/cq/kkinnunen@nvidia.com/335573002/20001
6 years, 6 months ago (2014-06-13 05:40:37 UTC) #6
commit-bot: I haz the power
6 years, 6 months ago (2014-06-13 06:06:33 UTC) #7
Message was sent while issue was closed.
Change committed as cb9a2c8934f009b6ee1ca73d662ac18b285085d9

Powered by Google App Engine
This is Rietveld 408576698