summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-09-02 10:52:46 +0100
committerTorne (Richard Coles) <torne@google.com>2013-09-02 10:52:46 +0100
commit91a7ba01202ba83dbd9e4d08551f98e45ea029dd (patch)
tree3b90f6ad3d7f61c703f8b75621831aa8af95652f
parentc8d516621e00993f8fa4c68d93015d67bf6cfa8b (diff)
parentfd6591478e8b18ada225e3231328d96fa6471688 (diff)
downloadsrc-91a7ba01202ba83dbd9e4d08551f98e45ea029dd.tar.gz
Merge third_party/skia/src from https://chromium.googlesource.com/a/external/skia/src.git at fd6591478e8b18ada225e3231328d96fa6471688
This commit was generated by merge_from_chromium.py. Change-Id: I002073c647279ac187defb691a123e1ee176593f
-rw-r--r--gpu/gl/GrGpuGL.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/gpu/gl/GrGpuGL.cpp b/gpu/gl/GrGpuGL.cpp
index 5845d7a6..8d500e36 100644
--- a/gpu/gl/GrGpuGL.cpp
+++ b/gpu/gl/GrGpuGL.cpp
@@ -950,12 +950,7 @@ GrTexture* GrGpuGL::onCreateTexture(const GrTextureDesc& desc,
}
GL_CALL(GenTextures(1, &glTexDesc.fTextureID));
- if (renderTarget && this->glCaps().textureUsageSupport()) {
- // provides a hint about how this texture will be used
- GL_CALL(TexParameteri(GR_GL_TEXTURE_2D,
- GR_GL_TEXTURE_USAGE,
- GR_GL_FRAMEBUFFER_ATTACHMENT));
- }
+
if (!glTexDesc.fTextureID) {
return return_null_texture();
}
@@ -963,6 +958,13 @@ GrTexture* GrGpuGL::onCreateTexture(const GrTextureDesc& desc,
this->setScratchTextureUnit();
GL_CALL(BindTexture(GR_GL_TEXTURE_2D, glTexDesc.fTextureID));
+ if (renderTarget && this->glCaps().textureUsageSupport()) {
+ // provides a hint about how this texture will be used
+ GL_CALL(TexParameteri(GR_GL_TEXTURE_2D,
+ GR_GL_TEXTURE_USAGE,
+ GR_GL_FRAMEBUFFER_ATTACHMENT));
+ }
+
// Some drivers like to know filter/wrap before seeing glTexImage2D. Some
// drivers have a bug where an FBO won't be complete if it includes a
// texture that is not mipmap complete (considering the filter in use).