aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProgramDesc.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-04-03 16:57:43 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-03 21:35:47 +0000
commit18dfa980765bee6a1ce7c5f430cb32f487da6590 (patch)
treef82444c520111b4710746480652fde74d2db3815 /src/gpu/GrProgramDesc.cpp
parentb9c4a6fc7de252633f16d11c2df10ee6de16af03 (diff)
Store the dst texture used by an XP in GrPipeline rather than in the XP.
This will allow the XP to be created before the dst texture. Change-Id: I3e5bdfa8e5d47e58a3560792ce5cf3899d30a024 Reviewed-on: https://skia-review.googlesource.com/11011 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrProgramDesc.cpp')
-rw-r--r--src/gpu/GrProgramDesc.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/GrProgramDesc.cpp b/src/gpu/GrProgramDesc.cpp
index 0e40a852c4..0b7d2c3d77 100644
--- a/src/gpu/GrProgramDesc.cpp
+++ b/src/gpu/GrProgramDesc.cpp
@@ -180,7 +180,13 @@ bool GrProgramDesc::Build(GrProgramDesc* desc,
}
const GrXferProcessor& xp = pipeline.getXferProcessor();
- xp.getGLSLProcessorKey(shaderCaps, &b);
+ const GrSurfaceOrigin* originIfDstTexture = nullptr;
+ GrSurfaceOrigin origin;
+ if (pipeline.dstTexture()) {
+ origin = pipeline.dstTexture()->origin();
+ originIfDstTexture = &origin;
+ }
+ xp.getGLSLProcessorKey(shaderCaps, &b, originIfDstTexture);
if (!gen_meta_key(xp, shaderCaps, 0, &b)) {
desc->key().reset();
return false;