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

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

Issue 608883003: GrResourceCache2 manages scratch texture. (Closed) Base URL: https://skia.googlesource.com/skia.git@surfimpl
Patch Set: remove todo Created 6 years, 2 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 | « include/gpu/GrTypesPriv.h ('k') | include/gpu/SkGrPixelRef.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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams* ); 71 bool GrIsBitmapInCache(const GrContext*, const SkBitmap&, const GrTextureParams* );
72 72
73 GrTexture* GrLockAndRefCachedBitmapTexture(GrContext*, const SkBitmap&, const Gr TextureParams*); 73 GrTexture* GrRefCachedBitmapTexture(GrContext*, const SkBitmap&, const GrTexture Params*);
74
75 void GrUnlockAndUnrefCachedBitmapTexture(GrTexture*);
76 74
77 //////////////////////////////////////////////////////////////////////////////// 75 ////////////////////////////////////////////////////////////////////////////////
78 76
79 // Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader. 77 // Converts a SkPaint to a GrPaint, ignoring the SkPaint's shader.
80 // 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
81 // Callers may subsequently modify the GrPaint. Setting constantColor indicates 79 // Callers may subsequently modify the GrPaint. Setting constantColor indicates
82 // 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
83 // 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
84 // color once while converting to GrPaint and then ignored. 82 // color once while converting to GrPaint and then ignored.
85 void SkPaint2GrPaintNoShader(GrContext* context, const SkPaint& skPaint, GrColor paintColor, 83 void SkPaint2GrPaintNoShader(GrContext* context, const SkPaint& skPaint, GrColor paintColor,
86 bool constantColor, GrPaint* grPaint); 84 bool constantColor, GrPaint* grPaint);
87 85
88 // This function is similar to skPaint2GrPaintNoShader but also converts 86 // This function is similar to skPaint2GrPaintNoShader but also converts
89 // skPaint's shader to a GrTexture/GrProcessorStage if possible. 87 // skPaint's shader to a GrTexture/GrProcessorStage if possible.
90 // constantColor has the same meaning as in skPaint2GrPaintNoShader. 88 // constantColor has the same meaning as in skPaint2GrPaintNoShader.
91 void SkPaint2GrPaintShader(GrContext* context, const SkPaint& skPaint, 89 void SkPaint2GrPaintShader(GrContext* context, const SkPaint& skPaint,
92 bool constantColor, GrPaint* grPaint); 90 bool constantColor, GrPaint* grPaint);
93 91
94 //////////////////////////////////////////////////////////////////////////////// 92 ////////////////////////////////////////////////////////////////////////////////
95 // Classes 93 // Classes
96 94
97 class SkGlyphCache; 95 class SkGlyphCache;
98 96
99 //////////////////////////////////////////////////////////////////////////////// 97 ////////////////////////////////////////////////////////////////////////////////
100 98
101 #endif 99 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrTypesPriv.h ('k') | include/gpu/SkGrPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698