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

Side by Side Diff: include/gpu/SkGr.h

Issue 726913002: Revert of Replace GrResourceCache with GrResourceCache2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | « include/gpu/GrUserConfig.h ('k') | src/gpu/GrAADistanceFieldPathRenderer.h » ('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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 return GrColorPackRGBA(r, g, b, a); 61 return GrColorPackRGBA(r, g, b, a);
62 } 62 }
63 63
64 static inline GrColor SkColor2GrColorJustAlpha(SkColor c) { 64 static inline GrColor SkColor2GrColorJustAlpha(SkColor c) {
65 U8CPU a = SkColorGetA(c); 65 U8CPU a = SkColorGetA(c);
66 return GrColorPackRGBA(a, a, a, a); 66 return GrColorPackRGBA(a, a, a, a);
67 } 67 }
68 68
69 //////////////////////////////////////////////////////////////////////////////// 69 ////////////////////////////////////////////////////////////////////////////////
70 70
71 // The cache listens for these messages to purge junk resources proactively.
72 struct GrResourceInvalidatedMessage {
73 GrResourceKey key;
74 };
75
76 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams* ); 71 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams* );
77 72
78 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTexture Params*); 73 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTexture Params*);
79 74
80 //////////////////////////////////////////////////////////////////////////////// 75 ////////////////////////////////////////////////////////////////////////////////
81 76
82 // Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader. 77 // Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader.
83 // Sets the color of GrPaint to the value of the parameter paintColor 78 // Sets the color of GrPaint to the value of the parameter paintColor
84 // Callers may subsequently modify the GrPaint. Setting constantColor indicates 79 // Callers may subsequently modify the GrPaint. Setting constantColor indicates
85 // that the final paint will draw the same color at every pixel. This allows 80 // that the final paint will draw the same color at every pixel. This allows
86 // an optimization where the the color filter can be applied to the SkPaint's 81 // an optimization where the the color filter can be applied to the SkPaint's
87 // color once while converting to GrPaint and then ignored. 82 // color once while converting to GrPaint and then ignored.
88 void SkPaint2GrPaintNoShader(GrContext* context, const SkPaint& skPaint, GrColor paintColor, 83 void SkPaint2GrPaintNoShader(GrContext* context, const SkPaint& skPaint, GrColor paintColor,
89 bool constantColor, GrPaint* grPaint); 84 bool constantColor, GrPaint* grPaint);
90 85
91 // This function is similar to skPaint2GrPaintNoShader but also converts 86 // This function is similar to skPaint2GrPaintNoShader but also converts
92 // skPaint's shader to a GrTexture/GrProcessorStage if possible. 87 // skPaint's shader to a GrTexture/GrProcessorStage if possible.
93 // constantColor has the same meaning as in skPaint2GrPaintNoShader. 88 // constantColor has the same meaning as in skPaint2GrPaintNoShader.
94 void SkPaint2GrPaintShader(GrContext* context, const SkPaint& skPaint, 89 void SkPaint2GrPaintShader(GrContext* context, const SkPaint& skPaint,
95 bool constantColor, GrPaint* grPaint); 90 bool constantColor, GrPaint* grPaint);
96 91
97 //////////////////////////////////////////////////////////////////////////////// 92 ////////////////////////////////////////////////////////////////////////////////
98 // Classes 93 // Classes
99 94
100 class SkGlyphCache; 95 class SkGlyphCache;
101 96
102 //////////////////////////////////////////////////////////////////////////////// 97 ////////////////////////////////////////////////////////////////////////////////
103 98
104 #endif 99 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrUserConfig.h ('k') | src/gpu/GrAADistanceFieldPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698