Make GrCopySurfaceOp participate in the GrOplist DAG
Change-Id: Ic72884c8447ad950a91a2afe9566dd5a92dd6f11 Reviewed-on: https://skia-review.googlesource.com/46582 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
d0530ba8f4
commit
9d6c64f29a
@ -11,6 +11,7 @@
|
|||||||
#include "GrContext.h"
|
#include "GrContext.h"
|
||||||
#include "GrGpu.h"
|
#include "GrGpu.h"
|
||||||
#include "GrOnFlushResourceProvider.h"
|
#include "GrOnFlushResourceProvider.h"
|
||||||
|
#include "GrOpList.h"
|
||||||
#include "GrRenderTargetContext.h"
|
#include "GrRenderTargetContext.h"
|
||||||
#include "GrPathRenderingRenderTargetContext.h"
|
#include "GrPathRenderingRenderTargetContext.h"
|
||||||
#include "GrRenderTargetProxy.h"
|
#include "GrRenderTargetProxy.h"
|
||||||
@ -120,7 +121,7 @@ GrSemaphoresSubmitted GrDrawingManager::internalFlush(GrSurfaceProxy*,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_MDB
|
#ifdef ENABLE_MDB_SORT
|
||||||
SkDEBUGCODE(bool result =)
|
SkDEBUGCODE(bool result =)
|
||||||
SkTTopoSort<GrOpList, GrOpList::TopoSortTraits>(&fOpLists);
|
SkTTopoSort<GrOpList, GrOpList::TopoSortTraits>(&fOpLists);
|
||||||
SkASSERT(result);
|
SkASSERT(result);
|
||||||
|
@ -13,7 +13,12 @@
|
|||||||
#include "SkRefCnt.h"
|
#include "SkRefCnt.h"
|
||||||
#include "SkTDArray.h"
|
#include "SkTDArray.h"
|
||||||
|
|
||||||
//#define ENABLE_MDB 1
|
|
||||||
|
// Turn on/off the explicit distribution of GPU resources at flush time
|
||||||
|
//#define MDB_ALLOC_RESOURCES 1
|
||||||
|
|
||||||
|
// Turn on/off the sorting of opLists at flush time
|
||||||
|
//#define ENABLE_MDB_SORT 1
|
||||||
|
|
||||||
class GrAuditTrail;
|
class GrAuditTrail;
|
||||||
class GrCaps;
|
class GrCaps;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "GrDrawingManager.h"
|
#include "GrDrawingManager.h"
|
||||||
#include "GrFixedClip.h"
|
#include "GrFixedClip.h"
|
||||||
#include "GrGpuResourcePriv.h"
|
#include "GrGpuResourcePriv.h"
|
||||||
|
#include "GrOpList.h"
|
||||||
#include "GrPathRenderer.h"
|
#include "GrPathRenderer.h"
|
||||||
#include "GrRenderTarget.h"
|
#include "GrRenderTarget.h"
|
||||||
#include "GrRenderTargetContextPriv.h"
|
#include "GrRenderTargetContextPriv.h"
|
||||||
|
@ -247,11 +247,8 @@ bool GrRenderTargetOpList::copySurface(const GrCaps& caps,
|
|||||||
if (!op) {
|
if (!op) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifdef ENABLE_MDB
|
|
||||||
this->addDependency(src);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
this->recordOp(std::move(op), caps);
|
this->addOp(std::move(op), caps);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ public:
|
|||||||
|
|
||||||
op->visitProxies(addDependency);
|
op->visitProxies(addDependency);
|
||||||
|
|
||||||
this->recordOp(std::move(op), caps, nullptr, nullptr);
|
this->recordOp(std::move(op), caps);
|
||||||
|
|
||||||
return this->uniqueID();
|
return this->uniqueID();
|
||||||
}
|
}
|
||||||
|
@ -98,9 +98,11 @@ bool GrTextureOpList::copySurface(const GrCaps& caps,
|
|||||||
if (!op) {
|
if (!op) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifdef ENABLE_MDB
|
|
||||||
this->addDependency(src);
|
auto addDependency = [ &caps, this ] (GrSurfaceProxy* p) {
|
||||||
#endif
|
this->addDependency(p, caps);
|
||||||
|
};
|
||||||
|
op->visitProxies(addDependency);
|
||||||
|
|
||||||
this->recordOp(std::move(op));
|
this->recordOp(std::move(op));
|
||||||
return true;
|
return true;
|
||||||
|
@ -21,6 +21,11 @@ public:
|
|||||||
|
|
||||||
const char* name() const override { return "CopySurface"; }
|
const char* name() const override { return "CopySurface"; }
|
||||||
|
|
||||||
|
void visitProxies(VisitProxyFunc func) const override {
|
||||||
|
func(fDst.get());
|
||||||
|
func(fSrc.get());
|
||||||
|
}
|
||||||
|
|
||||||
SkString dumpInfo() const override {
|
SkString dumpInfo() const override {
|
||||||
SkString string;
|
SkString string;
|
||||||
string.append(INHERITED::dumpInfo());
|
string.append(INHERITED::dumpInfo());
|
||||||
|
Loading…
Reference in New Issue
Block a user