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

Side by Side Diff: src/gpu/GrTextContext.h

Issue 605533002: Fix SkTextBlob offset semantics. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: default run positioning fix Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2010 Google Inc. 2 * Copyright 2010 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrTextContext_DEFINED 8 #ifndef GrTextContext_DEFINED
9 #define GrTextContext_DEFINED 9 #define GrTextContext_DEFINED
10 10
(...skipping 10 matching lines...) Expand all
21 /* 21 /*
22 * This class wraps the state for a single text render 22 * This class wraps the state for a single text render
23 */ 23 */
24 class GrTextContext { 24 class GrTextContext {
25 public: 25 public:
26 virtual ~GrTextContext() {} 26 virtual ~GrTextContext() {}
27 virtual void drawText(const GrPaint&, const SkPaint&, const char text[], siz e_t byteLength, 27 virtual void drawText(const GrPaint&, const SkPaint&, const char text[], siz e_t byteLength,
28 SkScalar x, SkScalar y) = 0; 28 SkScalar x, SkScalar y) = 0;
29 virtual void drawPosText(const GrPaint&, const SkPaint&, 29 virtual void drawPosText(const GrPaint&, const SkPaint&,
30 const char text[], size_t byteLength, 30 const char text[], size_t byteLength,
31 const SkScalar pos[], SkScalar constY, 31 const SkScalar pos[], int scalarsPerPosition,
32 int scalarsPerPosition) = 0; 32 const SkPoint& offset) = 0;
33 33
34 virtual bool canDraw(const SkPaint& paint) = 0; 34 virtual bool canDraw(const SkPaint& paint) = 0;
35 35
36 protected: 36 protected:
37 GrTextContext(GrContext*, const SkDeviceProperties&); 37 GrTextContext(GrContext*, const SkDeviceProperties&);
38 38
39 static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache); 39 static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache);
40 static void MeasureText(SkGlyphCache* cache, SkDrawCacheProc glyphCacheProc, 40 static void MeasureText(SkGlyphCache* cache, SkDrawCacheProc glyphCacheProc,
41 const char text[], size_t byteLength, SkVector* stop Vector); 41 const char text[], size_t byteLength, SkVector* stop Vector);
42 42
43 void init(const GrPaint&, const SkPaint&); 43 void init(const GrPaint&, const SkPaint&);
44 void finish() { fDrawTarget = NULL; } 44 void finish() { fDrawTarget = NULL; }
45 45
46 GrContext* fContext; 46 GrContext* fContext;
47 SkDeviceProperties fDeviceProperties; 47 SkDeviceProperties fDeviceProperties;
48 48
49 GrDrawTarget* fDrawTarget; 49 GrDrawTarget* fDrawTarget;
50 SkIRect fClipRect; 50 SkIRect fClipRect;
51 GrPaint fPaint; 51 GrPaint fPaint;
52 SkPaint fSkPaint; 52 SkPaint fSkPaint;
53 }; 53 };
54 54
55 #endif 55 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/SkGpuDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698