aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrTextureDomain.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-05-29 12:37:20 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-29 17:04:51 +0000
commit9bee2e5894bb8dd374392f238bc429e16f239583 (patch)
tree975ace2218b6911b62c9c9abceb2545cba9e5150 /src/gpu/effects/GrTextureDomain.cpp
parent761717146923163991aeb32d50f05a2bdf471dc4 (diff)
Revise system for checking for uninstantiated proxies
The new pattern is: we will "instantiate" pipelines at flush time at flush time we will only access the backing GrSurface by peeking If instantiation fails we should never try to access the GrSurfaces Change-Id: I87f7ff41bd0e84d9ca3dbdd61d3361d3d4ceefd6 Reviewed-on: https://skia-review.googlesource.com/17932 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/effects/GrTextureDomain.cpp')
-rw-r--r--src/gpu/effects/GrTextureDomain.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index ee21841656..1a6db7a9af 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -309,7 +309,9 @@ GrGLSLFragmentProcessor* GrTextureDomainEffect::onCreateGLSLInstance() const {
const GrFragmentProcessor& fp) override {
const GrTextureDomainEffect& tde = fp.cast<GrTextureDomainEffect>();
const GrTextureDomain& domain = tde.fTextureDomain;
- fGLDomain.setData(pdman, domain, tde.textureSampler(0).texture());
+ GrTexture* texture = tde.textureSampler(0).peekTexture();
+
+ fGLDomain.setData(pdman, domain, texture);
if (SkToBool(tde.colorSpaceXform())) {
fColorSpaceHelper.setData(pdman, tde.colorSpaceXform());
}
@@ -412,7 +414,8 @@ GrGLSLFragmentProcessor* GrDeviceSpaceTextureDecalFragmentProcessor::onCreateGLS
const GrFragmentProcessor& fp) override {
const GrDeviceSpaceTextureDecalFragmentProcessor& dstdfp =
fp.cast<GrDeviceSpaceTextureDecalFragmentProcessor>();
- GrTexture* texture = dstdfp.textureSampler(0).texture();
+ GrTexture* texture = dstdfp.textureSampler(0).peekTexture();
+
fGLDomain.setData(pdman, dstdfp.fTextureDomain, texture);
float iw = 1.f / texture->width();
float ih = 1.f / texture->height();