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

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

Issue 1107973004: Pull cache out of GrContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixpicturerenderer.cpp Created 5 years, 7 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/GrBatchFontCache.cpp ('k') | src/gpu/GrClipMaskManager.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 2012 Google Inc. 2 * Copyright 2012 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 GrClipMaskCache_DEFINED 8 #ifndef GrClipMaskCache_DEFINED
9 #define GrClipMaskCache_DEFINED 9 #define GrClipMaskCache_DEFINED
10 10
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 void acquireMask(GrContext* context, 200 void acquireMask(GrContext* context,
201 int32_t clipGenID, 201 int32_t clipGenID,
202 const GrSurfaceDesc& desc, 202 const GrSurfaceDesc& desc,
203 const SkIRect& bound) { 203 const SkIRect& bound) {
204 204
205 fLastClipGenID = clipGenID; 205 fLastClipGenID = clipGenID;
206 206
207 // HACK: set the last param to true to indicate that this request is at 207 // HACK: set the last param to true to indicate that this request is at
208 // flush time and therefore we require a scratch texture with no pen ding IO operations. 208 // flush time and therefore we require a scratch texture with no pen ding IO operations.
209 fLastMask.reset(context->refScratchTexture(desc, GrContext::kApprox_ ScratchTexMatch, 209 fLastMask.reset(context->textureProvider()->refScratchTexture(
210 /*flushing=*/true)); 210 desc, GrTextureProvider::kApprox_ScratchTexMatch, /*flushing=*/t rue));
211 211
212 fLastBound = bound; 212 fLastBound = bound;
213 } 213 }
214 214
215 void reset () { 215 void reset () {
216 fLastClipGenID = SkClipStack::kInvalidGenID; 216 fLastClipGenID = SkClipStack::kInvalidGenID;
217 217
218 GrSurfaceDesc desc; 218 GrSurfaceDesc desc;
219 219
220 fLastMask.reset(NULL); 220 fLastMask.reset(NULL);
(...skipping 10 matching lines...) Expand all
231 SkIRect fLastBound; 231 SkIRect fLastBound;
232 }; 232 };
233 233
234 GrContext* fContext; 234 GrContext* fContext;
235 SkDeque fStack; 235 SkDeque fStack;
236 236
237 typedef SkNoncopyable INHERITED; 237 typedef SkNoncopyable INHERITED;
238 }; 238 };
239 239
240 #endif // GrClipMaskCache_DEFINED 240 #endif // GrClipMaskCache_DEFINED
OLDNEW
« no previous file with comments | « src/gpu/GrBatchFontCache.cpp ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698