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

Side by Side Diff: src/gpu/GrClipMaskCache.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 | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/GrContext.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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 this->reset(); 197 this->reset();
198 } 198 }
199 199
200 void acquireMask(GrContext* context, 200 void acquireMask(GrContext* context,
201 int32_t clipGenID, 201 int32_t clipGenID,
202 const GrTextureDesc& desc, 202 const GrTextureDesc& desc,
203 const SkIRect& bound) { 203 const SkIRect& bound) {
204 204
205 fLastClipGenID = clipGenID; 205 fLastClipGenID = clipGenID;
206 206
207 fLastMask.set(context, desc); 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.
209 fLastMask.set(context, desc, GrContext::kApprox_ScratchTexMatch, /*f lushing=*/true);
208 210
209 fLastBound = bound; 211 fLastBound = bound;
210 } 212 }
211 213
212 void reset () { 214 void reset () {
213 fLastClipGenID = SkClipStack::kInvalidGenID; 215 fLastClipGenID = SkClipStack::kInvalidGenID;
214 216
215 GrTextureDesc desc; 217 GrTextureDesc desc;
216 218
217 fLastMask.set(NULL, desc); 219 fLastMask.set(NULL, desc);
(...skipping 10 matching lines...) Expand all
228 SkIRect fLastBound; 230 SkIRect fLastBound;
229 }; 231 };
230 232
231 GrContext* fContext; 233 GrContext* fContext;
232 SkDeque fStack; 234 SkDeque fStack;
233 235
234 typedef SkNoncopyable INHERITED; 236 typedef SkNoncopyable INHERITED;
235 }; 237 };
236 238
237 #endif // GrClipMaskCache_DEFINED 239 #endif // GrClipMaskCache_DEFINED
OLDNEW
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698