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>
diff --git a/src/gpu/GrProgramDesc.cpp b/src/gpu/GrProgramDesc.cpp
index ca81e5a..f40c6b6 100644
--- a/src/gpu/GrProgramDesc.cpp
+++ b/src/gpu/GrProgramDesc.cpp
@@ -218,17 +218,19 @@
// make sure any padding in the header is zeroed.
memset(header, 0, kHeaderSize);
- GrRenderTarget* rt = pipeline.getRenderTarget();
+ GrRenderTargetProxy* proxy = pipeline.proxy();
if (requiredFeatures & GrProcessor::kSampleLocations_RequiredFeature) {
SkASSERT(pipeline.isHWAntialiasState());
+
+ GrRenderTarget* rt = pipeline.renderTarget();
header->fSamplePatternKey =
rt->renderTargetPriv().getMultisampleSpecs(pipeline).fUniqueID;
} else {
header->fSamplePatternKey = 0;
}
- header->fOutputSwizzle = shaderCaps.configOutputSwizzle(rt->config()).asKey();
+ header->fOutputSwizzle = shaderCaps.configOutputSwizzle(proxy->config()).asKey();
header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters();
header->fColorFragmentProcessorCnt = pipeline.numColorFragmentProcessors();