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

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

Issue 1011403004: BitmapTextBatch and BitmapTextBlob (Closed) Base URL: https://skia.googlesource.com/skia.git@dfpr_take_2
Patch Set: feedback inc Created 5 years, 9 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
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
11 #include "GrClip.h" 11 #include "GrClip.h"
12 #include "GrGlyph.h" 12 #include "GrGlyph.h"
13 #include "GrPaint.h" 13 #include "GrPaint.h"
14 #include "SkDeviceProperties.h" 14 #include "SkDeviceProperties.h"
15 15
16 #include "SkPostConfig.h" 16 #include "SkPostConfig.h"
17 17
18 class GrClip; 18 class GrClip;
19 class GrContext; 19 class GrContext;
20 class GrDrawTarget; 20 class GrDrawTarget;
21 class GrFontScaler; 21 class GrFontScaler;
22 class SkDrawFilter; 22 class SkDrawFilter;
23 class SkGpuDevice; 23 class SkGpuDevice;
24 class SkTextBlob; 24 class SkTextBlob;
25 25
26 // For testing textblobs on GPU
27 #define USE_BITMAP_TEXTBLOBS
28
26 /* 29 /*
27 * This class wraps the state for a single text render 30 * This class wraps the state for a single text render
28 */ 31 */
29 class GrTextContext { 32 class GrTextContext {
30 public: 33 public:
31 virtual ~GrTextContext(); 34 virtual ~GrTextContext();
32 35
33 void drawText(GrRenderTarget* rt, const GrClip&, const GrPaint&, const SkPa int&, 36 void drawText(GrRenderTarget* rt, const GrClip&, const GrPaint&, const SkPa int&,
34 const SkMatrix& viewMatrix, const char text[], size_t byteLeng th, SkScalar x, 37 const SkMatrix& viewMatrix, const char text[], size_t byteLeng th, SkScalar x,
35 SkScalar y, const SkIRect& clipBounds); 38 SkScalar y, const SkIRect& clipBounds);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 const SkIRect& regionClipBounds); 91 const SkIRect& regionClipBounds);
89 void finish() { fDrawTarget = NULL; } 92 void finish() { fDrawTarget = NULL; }
90 93
91 static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache); 94 static GrFontScaler* GetGrFontScaler(SkGlyphCache* cache);
92 // sets extent in stopVector and returns glyph count 95 // sets extent in stopVector and returns glyph count
93 static int MeasureText(SkGlyphCache* cache, SkDrawCacheProc glyphCacheProc, 96 static int MeasureText(SkGlyphCache* cache, SkDrawCacheProc glyphCacheProc,
94 const char text[], size_t byteLength, SkVector* stopV ector); 97 const char text[], size_t byteLength, SkVector* stopV ector);
95 }; 98 };
96 99
97 #endif 100 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698