aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-28 14:10:15 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-28 14:10:15 +0000
commitc077d1eaa8322087f3cc954c3b2e9af7fef103fc (patch)
tree686f1341f0eaba197fca4fefe32c13516c48a5ef /include
parentab303ef6e86089ae28f30a52149f1dae177e1468 (diff)
Rolling back 4053
git-svn-id: http://skia.googlecode.com/svn/trunk@4054 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-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);