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

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

Issue 914723002: Small change to use a GrGeometryProcessor for all BitmapText draw calls (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: adding bench Created 5 years, 10 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 | « bench/TextBench.cpp ('k') | src/gpu/GrBitmapTextContext.cpp » ('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 2013 Google Inc. 2 * Copyright 2013 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 GrBitmapTextContext_DEFINED 8 #ifndef GrBitmapTextContext_DEFINED
9 #define GrBitmapTextContext_DEFINED 9 #define GrBitmapTextContext_DEFINED
10 10
(...skipping 14 matching lines...) Expand all
25 private: 25 private:
26 GrTextStrike* fStrike; 26 GrTextStrike* fStrike;
27 void* fVertices; 27 void* fVertices;
28 int fCurrVertex; 28 int fCurrVertex;
29 int fAllocVertexCount; 29 int fAllocVertexCount;
30 int fTotalVertexCount; 30 int fTotalVertexCount;
31 SkRect fVertexBounds; 31 SkRect fVertexBounds;
32 GrTexture* fCurrTexture; 32 GrTexture* fCurrTexture;
33 GrMaskFormat fCurrMaskFormat; 33 GrMaskFormat fCurrMaskFormat;
34 SkAutoTUnref<const GrGeometryProcessor> fCachedGeometryProcessor; 34 SkAutoTUnref<const GrGeometryProcessor> fCachedGeometryProcessor;
35 SkAutoTUnref<const GrFragmentProcessor> fCachedTextureProcessor;
36 // Used to check whether fCachedEffect is still valid. 35 // Used to check whether fCachedEffect is still valid.
37 uint32_t fEffectTextureUniqueID; 36 uint32_t fEffectTextureUniqueID;
38 SkMatrix fLocalMatrix; 37 SkMatrix fLocalMatrix;
39 38
40 GrBitmapTextContext(GrContext*, const SkDeviceProperties&); 39 GrBitmapTextContext(GrContext*, const SkDeviceProperties&);
41 40
42 bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) SK_OVERRIDE; 41 bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) SK_OVERRIDE;
43 42
44 virtual void onDrawText(const GrPaint&, const SkPaint&, const SkMatrix& view Matrix, 43 virtual void onDrawText(const GrPaint&, const SkPaint&, const SkMatrix& view Matrix,
45 const char text[], size_t byteLength, 44 const char text[], size_t byteLength,
46 SkScalar x, SkScalar y) SK_OVERRIDE; 45 SkScalar x, SkScalar y) SK_OVERRIDE;
47 virtual void onDrawPosText(const GrPaint&, const SkPaint&, const SkMatrix& v iewMatrix, 46 virtual void onDrawPosText(const GrPaint&, const SkPaint&, const SkMatrix& v iewMatrix,
48 const char text[], size_t byteLength, 47 const char text[], size_t byteLength,
49 const SkScalar pos[], int scalarsPerPosition, 48 const SkScalar pos[], int scalarsPerPosition,
50 const SkPoint& offset) SK_OVERRIDE; 49 const SkPoint& offset) SK_OVERRIDE;
51 50
52 void init(const GrPaint&, const SkPaint&); 51 void init(const GrPaint&, const SkPaint&);
53 void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler* ); 52 void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler* );
54 bool uploadGlyph(GrGlyph*, GrFontScaler*); 53 bool uploadGlyph(GrGlyph*, GrFontScaler*);
55 void flush(); // automatically called by destructor 54 void flush(); // automatically called by destructor
56 void finish(); 55 void finish();
57 }; 56 };
58 57
59 #endif 58 #endif
OLDNEW
« no previous file with comments | « bench/TextBench.cpp ('k') | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698