| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |