aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu
diff options
context:
space:
mode:
authorGravatar Chris Dalton <csmartdalton@google.com>2017-11-29 22:01:06 -0700
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-30 15:37:12 +0000
commit706a6ff60c55bee85cff06fc9f8f3764f6e5154b (patch)
treece416111dc4101cf58ee12bd7c35007317f33819 /tools/gpu
parentde2f1dfebd9d28787cdfd77496f365ed3eb6894d (diff)
Add "lazy" texture proxies
Adds ultra-deferred proxies that are instantiated by a user-supplied callback during flush. Bug: skia:7190 Change-Id: I75a7ac6dba953c3b0a99febc203a7f4d2f3789fc Reviewed-on: https://skia-review.googlesource.com/76461 Commit-Queue: Chris Dalton <csmartdalton@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tools/gpu')
-rw-r--r--tools/gpu/GrTest.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index 47f98a6c20..524cd634fe 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -274,7 +274,13 @@ int GrResourceCache::countUniqueKeysWithTag(const char* tag) const {
#define ASSERT_SINGLE_OWNER \
SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(fRenderTargetContext->singleOwner());)
+
uint32_t GrRenderTargetContextPriv::testingOnly_addDrawOp(std::unique_ptr<GrDrawOp> op) {
+ return this->testingOnly_addDrawOp(GrNoClip(), std::move(op));
+}
+
+uint32_t GrRenderTargetContextPriv::testingOnly_addDrawOp(const GrClip& clip,
+ std::unique_ptr<GrDrawOp> op) {
ASSERT_SINGLE_OWNER
if (fRenderTargetContext->drawingManager()->wasAbandoned()) {
return SK_InvalidUniqueID;
@@ -282,7 +288,7 @@ uint32_t GrRenderTargetContextPriv::testingOnly_addDrawOp(std::unique_ptr<GrDraw
SkDEBUGCODE(fRenderTargetContext->validate());
GR_AUDIT_TRAIL_AUTO_FRAME(fRenderTargetContext->fAuditTrail,
"GrRenderTargetContext::testingOnly_addDrawOp");
- return fRenderTargetContext->addDrawOp(GrNoClip(), std::move(op));
+ return fRenderTargetContext->addDrawOp(clip, std::move(op));
}
#undef ASSERT_SINGLE_OWNER