aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu/GrTest.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-03-06 16:17:12 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-07 15:11:24 +0000
commit467921e5e6479fe9cebba125657d8e33d89004ae (patch)
treebffd056e5d9ad99a50c1876d658f4b31d6721d15 /tools/gpu/GrTest.cpp
parent894d5611e54cbf62a03ff9ffb48a2302dda9ab86 (diff)
Move GrDrawOp pipeline/clip processing to GrRenderTargetContext
This is currently done in GrOpList. However, it can trigger resource creation, which in turn can trigger a flush. In the future flushing may destroy the op list. Change-Id: I21cb1e10060bf31c95431c0511fcfff637cd6498 Reviewed-on: https://skia-review.googlesource.com/9304 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tools/gpu/GrTest.cpp')
-rw-r--r--tools/gpu/GrTest.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index ef3cc48e57..55529d85e1 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -237,8 +237,7 @@ int GrResourceCache::countUniqueKeysWithTag(const char* tag) const {
void GrRenderTargetContextPriv::testingOnly_addDrawOp(GrPaint&& paint,
GrAAType aaType,
- std::unique_ptr<GrDrawOp>
- op,
+ std::unique_ptr<GrDrawOp> op,
const GrUserStencilSettings* uss,
bool snapToCenters) {
ASSERT_SINGLE_OWNER
@@ -253,8 +252,7 @@ void GrRenderTargetContextPriv::testingOnly_addDrawOp(GrPaint&& paint,
}
pipelineBuilder.setSnapVerticesToPixelCenters(snapToCenters);
- fRenderTargetContext->getOpList()->addDrawOp(pipelineBuilder, fRenderTargetContext, GrNoClip(),
- std::move(op));
+ fRenderTargetContext->addDrawOp(pipelineBuilder, GrNoClip(), std::move(op));
}
#undef ASSERT_SINGLE_OWNER
@@ -280,6 +278,9 @@ public:
bool isConfigTexturable(GrPixelConfig config) const override { return false; }
bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const override { return false; }
bool canConfigBeImageStorage(GrPixelConfig) const override { return false; }
+ bool initDescForDstCopy(const GrRenderTarget* src, GrSurfaceDesc* desc) const override {
+ return false;
+ }
private:
typedef GrCaps INHERITED;
@@ -310,10 +311,6 @@ public:
*effectiveSampleCnt = rt->desc().fSampleCnt;
}
- bool initDescForDstCopy(const GrRenderTarget* src, GrSurfaceDesc* desc) const override {
- return false;
- }
-
GrGpuCommandBuffer* createCommandBuffer(const GrGpuCommandBuffer::LoadAndStoreInfo&,
const GrGpuCommandBuffer::LoadAndStoreInfo&) override {
return nullptr;