aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSurfaceProxy.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2016-10-28 13:25:24 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-10-28 18:35:06 +0000
commitc7635fa374b87711e5ccd8222957a8fbdc772f7b (patch)
treec739d7303f25450cfca3f148458cec509bfa4e8a /src/gpu/GrSurfaceProxy.cpp
parent57a98fc4d595875ca75f906acec8ba508dcb5248 (diff)
Make GrDrawContext be GrRenderTargetProxy-backed
This is split out of https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus)) GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3841 CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android-Trybot Change-Id: I1a47f19ed1ac0c249e6ccac8db74095d7f456db4 Reviewed-on: https://skia-review.googlesource.com/3841 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrSurfaceProxy.cpp')
-rw-r--r--src/gpu/GrSurfaceProxy.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gpu/GrSurfaceProxy.cpp b/src/gpu/GrSurfaceProxy.cpp
index 9cd84ed4c6..094eaa366a 100644
--- a/src/gpu/GrSurfaceProxy.cpp
+++ b/src/gpu/GrSurfaceProxy.cpp
@@ -7,8 +7,18 @@
#include "GrSurfaceProxy.h"
+#include "GrGpuResourcePriv.h"
#include "GrOpList.h"
+GrSurfaceProxy::GrSurfaceProxy(sk_sp<GrSurface> surface, SkBackingFit fit)
+ : INHERITED(std::move(surface))
+ , fDesc(fTarget->desc())
+ , fFit(fit)
+ , fBudgeted(fTarget->resourcePriv().isBudgeted())
+ , fUniqueID(fTarget->uniqueID())
+ , fLastOpList(nullptr) {
+}
+
GrSurfaceProxy::~GrSurfaceProxy() {
if (fLastOpList) {
fLastOpList->clearTarget();