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

Side by Side Diff: src/gpu/GrStencilAndCoverTextContext.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 | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.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 2014 Google Inc. 2 * Copyright 2014 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 GrStencilAndCoverTextContext_DEFINED 8 #ifndef GrStencilAndCoverTextContext_DEFINED
9 #define GrStencilAndCoverTextContext_DEFINED 9 #define GrStencilAndCoverTextContext_DEFINED
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 SkPoint fGlyphPositions[kGlyphBu fferSize]; 63 SkPoint fGlyphPositions[kGlyphBu fferSize];
64 int fQueuedGlyphCount; 64 int fQueuedGlyphCount;
65 int fFallbackGlyphsIdx; 65 int fFallbackGlyphsIdx;
66 SkMatrix fContextInitialMatrix; 66 SkMatrix fContextInitialMatrix;
67 SkMatrix fViewMatrix; 67 SkMatrix fViewMatrix;
68 SkMatrix fLocalMatrix; 68 SkMatrix fLocalMatrix;
69 bool fUsingDeviceSpaceGlyphs; 69 bool fUsingDeviceSpaceGlyphs;
70 70
71 GrStencilAndCoverTextContext(GrContext*, SkGpuDevice*, const SkDevicePropert ies&); 71 GrStencilAndCoverTextContext(GrContext*, SkGpuDevice*, const SkDevicePropert ies&);
72 72
73 bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) SK_OVERRIDE; 73 bool canDraw(const GrRenderTarget*, const GrClip&, const GrPaint&,
74 const SkPaint&, const SkMatrix& viewMatrix) SK_OVERRIDE;
74 75
75 virtual void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, cons t SkPaint&, 76 void onDrawText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPain t&,
76 const SkMatrix& viewMatrix, 77 const SkMatrix& viewMatrix,
77 const char text[], size_t byteLength, 78 const char text[], size_t byteLength,
78 SkScalar x, SkScalar y, const SkIRect& regionClipBou nds) SK_OVERRIDE; 79 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) SK_ OVERRIDE;
79 virtual void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, c onst SkPaint&, 80 void onDrawPosText(GrRenderTarget*, const GrClip&, const GrPaint&, const SkP aint&,
80 const SkMatrix& viewMatrix, 81 const SkMatrix& viewMatrix,
81 const char text[], size_t byteLength, 82 const char text[], size_t byteLength,
82 const SkScalar pos[], int scalarsPerPosition, 83 const SkScalar pos[], int scalarsPerPosition,
83 const SkPoint& offset, const SkIRect& regionClipB ounds) SK_OVERRIDE; 84 const SkPoint& offset, const SkIRect& regionClipBounds) S K_OVERRIDE;
84 85
85 void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&, 86 void init(GrRenderTarget*, const GrClip&, const GrPaint&, const SkPaint&,
86 size_t textByteLength, RenderMode, const SkMatrix& viewMatrix, 87 size_t textByteLength, RenderMode, const SkMatrix& viewMatrix,
87 const SkIRect& regionClipBounds); 88 const SkIRect& regionClipBounds);
88 bool mapToFallbackContext(SkMatrix* inverse); 89 bool mapToFallbackContext(SkMatrix* inverse);
89 void appendGlyph(const SkGlyph&, const SkPoint&); 90 void appendGlyph(const SkGlyph&, const SkPoint&);
90 void flush(); 91 void flush();
91 void finish(); 92 void finish();
92 93
93 }; 94 };
94 95
95 #endif 96 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDistanceFieldTextContext.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698