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

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

Issue 939623005: Pass Rendertarget into context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: sampleapp 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 | « 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 int fFallbackGlyphsIdx; 64 int fFallbackGlyphsIdx;
65 SkMatrix fContextInitialMatrix; 65 SkMatrix fContextInitialMatrix;
66 SkMatrix fViewMatrix; 66 SkMatrix fViewMatrix;
67 SkMatrix fLocalMatrix; 67 SkMatrix fLocalMatrix;
68 bool fUsingDeviceSpaceGlyphs; 68 bool fUsingDeviceSpaceGlyphs;
69 69
70 GrStencilAndCoverTextContext(GrContext*, const SkDeviceProperties&); 70 GrStencilAndCoverTextContext(GrContext*, const SkDeviceProperties&);
71 71
72 bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) SK_OVERRIDE; 72 bool canDraw(const SkPaint& paint, const SkMatrix& viewMatrix) SK_OVERRIDE;
73 73
74 virtual void onDrawText(const GrPaint&, const SkPaint&, const SkMatrix& view Matrix, 74 virtual void onDrawText(GrRenderTarget*, const GrPaint&, const SkPaint&,
75 const SkMatrix& viewMatrix,
75 const char text[], size_t byteLength, 76 const char text[], size_t byteLength,
76 SkScalar x, SkScalar y) SK_OVERRIDE; 77 SkScalar x, SkScalar y) SK_OVERRIDE;
77 virtual void onDrawPosText(const GrPaint&, const SkPaint&, const SkMatrix& v iewMatrix, 78 virtual void onDrawPosText(GrRenderTarget*, const GrPaint&, const SkPaint&,
79 const SkMatrix& viewMatrix,
78 const char text[], size_t byteLength, 80 const char text[], size_t byteLength,
79 const SkScalar pos[], int scalarsPerPosition, 81 const SkScalar pos[], int scalarsPerPosition,
80 const SkPoint& offset) SK_OVERRIDE; 82 const SkPoint& offset) SK_OVERRIDE;
81 83
82 void init(const GrPaint&, const SkPaint&, size_t textByteLength, RenderMode, 84 void init(GrRenderTarget*, const GrPaint&, const SkPaint&, size_t textByteLe ngth, RenderMode,
83 const SkMatrix& viewMatrix); 85 const SkMatrix& viewMatrix);
84 bool mapToFallbackContext(SkMatrix* inverse); 86 bool mapToFallbackContext(SkMatrix* inverse);
85 void appendGlyph(const SkGlyph&, const SkPoint&); 87 void appendGlyph(const SkGlyph&, const SkPoint&);
86 void flush(); 88 void flush();
87 void finish(); 89 void finish();
88 90
89 }; 91 };
90 92
91 #endif 93 #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