aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gpu/GrContext.h')
-rw-r--r--include/gpu/GrContext.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 470741e7d5..c9c15dfcac 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -857,13 +857,8 @@ public:
}
~GrAutoScratchTexture() {
- this->reset();
- }
-
- void reset() {
if (NULL != fContext) {
fContext->unlockTexture(fEntry);
- fEntry.reset();
}
}
@@ -871,8 +866,10 @@ public:
const GrTextureDesc& desc,
GrContext::ScratchTexMatch match =
GrContext::kApprox_ScratchTexMatch) {
- this->reset();
-
+ if (NULL != fContext) {
+ fContext->unlockTexture(fEntry);
+ fEntry.reset();
+ }
fContext = context;
if (NULL != fContext) {
fEntry = fContext->lockScratchTexture(desc, match);