aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-11-16 11:17:17 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-11-16 11:17:17 -0800
commit1125a030c726854f94fd2b8eed49d1323fc1d038 (patch)
tree56a26a60c160186a4cada83e904d0d3c60c25a6e /src/gpu
parent20079a94e82fd7345dfb119a8777e5ba482a041c (diff)
Add IORef capability to GrSurfaceProxy objects - take 2
Re-landing of https://skia-review.googlesource.com/c/4734/ (Add IORef capability to GrSurfaceProxy objects) with fixes for: platforms that don't support discards. memory leak due to copying over of GrSurfaceProxy's creation ref to instantiated GrSurface in instantiate() GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4827 BUG=skia: Change-Id: If0b695d5cafc5ef3fdd251c38262849d09e5d27f Review-Url: https://codereview.chromium.org/2502923003
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrSurfaceProxy.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index 831cd3213c..9de41ef482 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -43,6 +43,8 @@ GrSurface* GrSurfaceProxy::instantiate(GrTextureProvider* texProvider) {
return nullptr;
}
+ this->INHERITED::transferRefs();
+
#ifdef SK_DEBUG
if (kInvalidGpuMemorySize != this->getRawGpuMemorySize_debugOnly()) {
SkASSERT(fTarget->gpuMemorySize() <= this->getRawGpuMemorySize_debugOnly());