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

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

Issue 1010113004: Add GrRenderTarget parameter to GrTextContext::canDraw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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
« no previous file with comments | « no previous file | 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 21 matching lines...) Expand all
32 SkRect fVertexBounds; 32 SkRect fVertexBounds;
33 GrTexture* fCurrTexture; 33 GrTexture* fCurrTexture;
34 GrMaskFormat fCurrMaskFormat; 34 GrMaskFormat fCurrMaskFormat;
35 SkAutoTUnref<const GrGeometryProcessor> fCachedGeometryProcessor; 35 SkAutoTUnref<const GrGeometryProcessor> fCachedGeometryProcessor;
36 // Used to check whether fCachedEffect is still valid. 36 // Used to check whether fCachedEffect is still valid.
37 uint32_t fEffectTextureUniqueID; 37 uint32_t fEffectTextureUniqueID;
38 SkMatrix fLocalMatrix; 38 SkMatrix fLocalMatrix;
39 39
40 GrBitmapTextContext(GrContext*, SkGpuDevice*, const SkDeviceProperties&); 40 GrBitmapTextContext(GrContext*, SkGpuDevice*, const SkDeviceProperties&);
41 41
42 bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) SK_OVERRIDE; 42 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&,
43 const SkPaint&, const SkMatrix& viewMatrix) SK_OVERRIDE;
43 44
44 virtual void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, cons t SkPaint&, 45 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPain t&,
45 const SkMatrix& viewMatrix, const char text[], size_ t byteLength, 46 const SkMatrix& viewMatrix, const char text[], size_t byteLe ngth,
46 SkScalar x, SkScalar y, const SkIRect& regionClipBou nds) SK_OVERRIDE; 47 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) SK_ OVERRIDE;
47 virtual void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, c onst SkPaint&, 48 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkP aint&,
48 const SkMatrix& viewMatrix, 49 const SkMatrix& viewMatrix,
49 const char text[], size_t byteLength, 50 const char text[], size_t byteLength,
50 const SkScalar pos[], int scalarsPerPosition, 51 const SkScalar pos[], int scalarsPerPosition,
51 const SkPoint& offset, const SkIRect& regionClipB ounds) SK_OVERRIDE; 52 const SkPoint& offset, const SkIRect& regionClipBounds) S K_OVERRIDE;
52 53
53 void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, 54 void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&,
54 const SkIRect& regionClipBounds); 55 const SkIRect& regionClipBounds);
55 void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler* ); 56 void appendGlyph(GrGlyph::PackedID, SkFixed left, SkFixed top, GrFontScaler* );
56 bool uploadGlyph(GrGlyph*, GrFontScaler*); 57 bool uploadGlyph(GrGlyph*, GrFontScaler*);
57 void flush(); // automatically called by destructor 58 void flush(); // automatically called by destructor
58 void finish(); 59 void finish();
59 }; 60 };
60 61
61 #endif 62 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrBitmapTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698