Add GrOpList and rename GrDrawTarget to GrRenderTargetOpList
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3910
Change-Id: I026aa26ecc61a0d002e98892dca728536259e8b1
Reviewed-on: https://skia-review.googlesource.com/3910
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrRenderTargetProxy.cpp b/src/gpu/GrRenderTargetProxy.cpp
index fa6bd26..5ea43d6 100644
--- a/src/gpu/GrRenderTargetProxy.cpp
+++ b/src/gpu/GrRenderTargetProxy.cpp
@@ -8,8 +8,9 @@
#include "GrRenderTargetProxy.h"
#include "GrCaps.h"
-#include "GrDrawTarget.h"
#include "GrGpuResourcePriv.h"
+#include "GrRenderTargetOpList.h"
+#include "GrTextureProvider.h"
// Deferred version
// TODO: we can probably munge the 'desc' in both the wrapped and deferred
@@ -18,8 +19,7 @@
SkBackingFit fit, SkBudgeted budgeted)
: INHERITED(desc, fit, budgeted)
, fTarget(nullptr)
- , fFlags(GrRenderTargetPriv::Flags::kNone)
- , fLastDrawTarget(nullptr) {
+ , fFlags(GrRenderTargetPriv::Flags::kNone) {
// Since we know the newly created render target will be internal, we are able to precompute
// what the flags will ultimately end up being.
if (caps.usesMixedSamples() && fDesc.fSampleCnt > 0) {
@@ -35,15 +35,7 @@
: INHERITED(rt->desc(), SkBackingFit::kExact,
rt->resourcePriv().isBudgeted(), rt->uniqueID())
, fTarget(std::move(rt))
- , fFlags(fTarget->renderTargetPriv().flags())
- , fLastDrawTarget(nullptr) {
-}
-
-GrRenderTargetProxy::~GrRenderTargetProxy() {
- if (fLastDrawTarget) {
- fLastDrawTarget->clearRT();
- }
- SkSafeUnref(fLastDrawTarget);
+ , fFlags(fTarget->renderTargetPriv().flags()) {
}
GrRenderTarget* GrRenderTargetProxy::instantiate(GrTextureProvider* texProvider) {
@@ -73,18 +65,6 @@
return fTarget.get();
}
-void GrRenderTargetProxy::setLastDrawTarget(GrDrawTarget* dt) {
- if (fLastDrawTarget) {
- // The non-MDB world never closes so we can't check this condition
-#ifdef ENABLE_MDB
- SkASSERT(fLastDrawTarget->isClosed());
-#endif
- fLastDrawTarget->clearRT();
- }
-
- SkRefCnt_SafeAssign(fLastDrawTarget, dt);
-}
-
sk_sp<GrRenderTargetProxy> GrRenderTargetProxy::Make(const GrCaps& caps,
const GrSurfaceDesc& desc,
SkBackingFit fit,