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

Side by Side Diff: src/gpu/text/GrAtlasTextContext.h

Issue 1606943002: A few more small changes to make GrAtlasTextBlob nearly self contained (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanuptext16
Patch Set: cleanup Created 4 years, 11 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/text/GrAtlasTextBlob.cpp ('k') | src/gpu/text/GrAtlasTextContext.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 2015 Google Inc. 2 * Copyright 2015 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 GrAtlasTextContext_DEFINED 8 #ifndef GrAtlasTextContext_DEFINED
9 #define GrAtlasTextContext_DEFINED 9 #define GrAtlasTextContext_DEFINED
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) ove rride; 44 SkScalar x, SkScalar y, const SkIRect& regionClipBounds) ove rride;
45 void onDrawPosText(GrDrawContext*, const GrClip&, const GrPaint&, 45 void onDrawPosText(GrDrawContext*, const GrClip&, const GrPaint&,
46 const SkPaint&, const SkMatrix& viewMatrix, 46 const SkPaint&, const SkMatrix& viewMatrix,
47 const char text[], size_t byteLength, 47 const char text[], size_t byteLength,
48 const SkScalar pos[], int scalarsPerPosition, 48 const SkScalar pos[], int scalarsPerPosition,
49 const SkPoint& offset, const SkIRect& regionClipBounds) o verride; 49 const SkPoint& offset, const SkIRect& regionClipBounds) o verride;
50 void drawTextBlob(GrDrawContext*, const GrClip&, const SkPaint&, 50 void drawTextBlob(GrDrawContext*, const GrClip&, const SkPaint&,
51 const SkMatrix& viewMatrix, const SkTextBlob*, SkScalar x, SkScalar y, 51 const SkMatrix& viewMatrix, const SkTextBlob*, SkScalar x, SkScalar y,
52 SkDrawFilter*, const SkIRect& clipBounds) override; 52 SkDrawFilter*, const SkIRect& clipBounds) override;
53 53
54 typedef GrAtlasTextBlob::Run Run;
55 typedef Run::SubRunInfo PerSubRunInfo;
56
57 // sets up the descriptor on the blob and returns a detached cache. Client must attach 54 // sets up the descriptor on the blob and returns a detached cache. Client must attach
58 inline static GrColor ComputeCanonicalColor(const SkPaint&, bool lcd); 55 inline static GrColor ComputeCanonicalColor(const SkPaint&, bool lcd);
59 void regenerateTextBlob(GrAtlasTextBlob* bmp, const SkPaint& skPaint, GrColo r, 56 void regenerateTextBlob(GrAtlasTextBlob* bmp, const SkPaint& skPaint, GrColo r,
60 const SkMatrix& viewMatrix, 57 const SkMatrix& viewMatrix,
61 const SkTextBlob* blob, SkScalar x, SkScalar y, 58 const SkTextBlob* blob, SkScalar x, SkScalar y,
62 SkDrawFilter* drawFilter); 59 SkDrawFilter* drawFilter);
63 inline static bool HasLCD(const SkTextBlob*); 60 inline static bool HasLCD(const SkTextBlob*);
64 61
65 // Test methods 62 // Test methods
66 // TODO this is really ugly. It'd be much nicer if positioning could be mov ed to batch 63 // TODO this is really ugly. It'd be much nicer if positioning could be mov ed to batch
(...skipping 13 matching lines...) Expand all
80 SkAutoTUnref<const GrDistanceFieldAdjustTable> fDistanceAdjustTable; 77 SkAutoTUnref<const GrDistanceFieldAdjustTable> fDistanceAdjustTable;
81 78
82 #ifdef GR_TEST_UTILS 79 #ifdef GR_TEST_UTILS
83 DRAW_BATCH_TEST_FRIEND(TextBlobBatch); 80 DRAW_BATCH_TEST_FRIEND(TextBlobBatch);
84 #endif 81 #endif
85 82
86 typedef GrTextContext INHERITED; 83 typedef GrTextContext INHERITED;
87 }; 84 };
88 85
89 #endif 86 #endif
OLDNEW
« no previous file with comments | « src/gpu/text/GrAtlasTextBlob.cpp ('k') | src/gpu/text/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698