aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-07-26 15:48:41 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-26 20:59:00 +0000
commit2890fbfe1400b81e4d6af98d14dfe757fec93650 (patch)
treebbc22dc56d4cdb0b1f6b06740c68738808506f67 /tests
parent480c90afc4382d03fa7cda534a702459ace72953 (diff)
Make GrPipeline hold a GrRenderTargetProxy (instead of a GrRenderTarget)
In a future world where GrSurface no longer has an origin it will be useful for the GrPipeline to be holding the GrRenderTargetProxy (which will still have an origin). Change-Id: I743a8cc07b6b92f8116227fb77b7c37da43cde8a Reviewed-on: https://skia-review.googlesource.com/26804 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/GpuSampleLocationsTest.cpp2
-rw-r--r--tests/GrMeshTest.cpp4
-rw-r--r--tests/GrPipelineDynamicStateTest.cpp4
-rw-r--r--tests/GrSurfaceTest.cpp1
-rw-r--r--tests/VkWrapTests.cpp1
5 files changed, 7 insertions, 5 deletions
diff --git a/tests/GpuSampleLocationsTest.cpp b/tests/GpuSampleLocationsTest.cpp
index 0f8fd7f9b3..b11c0f2beb 100644
--- a/tests/GpuSampleLocationsTest.cpp
+++ b/tests/GpuSampleLocationsTest.cpp
@@ -132,7 +132,7 @@ void test_sampleLocations(skiatest::Reporter* reporter, TestSampleLocationsInter
for (int i = 0; i < numTestPatterns; ++i) {
testInterface->overrideSamplePattern(kTestPatterns[i]);
for (GrRenderTargetContext* rtc : {bottomUps[i].get(), topDowns[i].get()}) {
- GrPipeline dummyPipeline(rtc->accessRenderTarget(),
+ GrPipeline dummyPipeline(rtc->asRenderTargetProxy(),
GrPipeline::ScissorState::kDisabled,
SkBlendMode::kSrcOver);
GrRenderTarget* rt = rtc->accessRenderTarget();
diff --git a/tests/GrMeshTest.cpp b/tests/GrMeshTest.cpp
index 0e67acfcfc..922a996499 100644
--- a/tests/GrMeshTest.cpp
+++ b/tests/GrMeshTest.cpp
@@ -367,8 +367,8 @@ sk_sp<const GrBuffer> DrawMeshHelper::getIndexBuffer() {
}
void DrawMeshHelper::drawMesh(const GrMesh& mesh) {
- GrRenderTarget* rt = fState->drawOpArgs().fRenderTarget;
- GrPipeline pipeline(rt, GrPipeline::ScissorState::kDisabled, SkBlendMode::kSrc);
+ GrRenderTargetProxy* proxy = fState->drawOpArgs().fProxy;
+ GrPipeline pipeline(proxy, GrPipeline::ScissorState::kDisabled, SkBlendMode::kSrc);
GrMeshTestProcessor mtp(mesh.isInstanced(), mesh.hasVertexData());
fState->commandBuffer()->draw(pipeline, mtp, &mesh, nullptr, 1,
SkRect::MakeIWH(kImageWidth, kImageHeight));
diff --git a/tests/GrPipelineDynamicStateTest.cpp b/tests/GrPipelineDynamicStateTest.cpp
index 007702a2cc..2c9e2c3b17 100644
--- a/tests/GrPipelineDynamicStateTest.cpp
+++ b/tests/GrPipelineDynamicStateTest.cpp
@@ -125,8 +125,8 @@ private:
bool onCombineIfPossible(GrOp* other, const GrCaps& caps) override { return false; }
void onPrepare(GrOpFlushState*) override {}
void onExecute(GrOpFlushState* state) override {
- GrRenderTarget* rt = state->drawOpArgs().fRenderTarget;
- GrPipeline pipeline(rt, fScissorState, SkBlendMode::kSrc);
+ GrRenderTargetProxy* proxy = state->drawOpArgs().fProxy;
+ GrPipeline pipeline(proxy, fScissorState, SkBlendMode::kSrc);
SkSTArray<kNumMeshes, GrMesh> meshes;
for (int i = 0; i < kNumMeshes; ++i) {
GrMesh& mesh = meshes.emplace_back(GrPrimitiveType::kTriangleStrip);
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index f1d6a269bc..71575c74f9 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -12,6 +12,7 @@
#include "GrContext.h"
#include "GrContextPriv.h"
#include "GrGpu.h"
+#include "GrRenderTarget.h"
#include "GrResourceProvider.h"
#include "GrTest.h"
#include "GrTexture.h"
diff --git a/tests/VkWrapTests.cpp b/tests/VkWrapTests.cpp
index 4e363153f0..f64043df62 100644
--- a/tests/VkWrapTests.cpp
+++ b/tests/VkWrapTests.cpp
@@ -12,6 +12,7 @@
#if SK_SUPPORT_GPU && defined(SK_VULKAN)
#include "GrContextFactory.h"
+#include "GrRenderTarget.h"
#include "GrTest.h"
#include "GrTexture.h"