aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLTexture.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-05-31 09:55:04 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-31 14:38:43 +0000
commit0cc507d22566bb7e28e5fe21e4b3fc7b682d86a2 (patch)
tree460ac21731d404377053dbe4755530b49f170d64 /src/gpu/gl/GrGLTexture.h
parent59a8b9c12e4b6152f9a5807bd3fd45664de35048 (diff)
Expand partial render target write pixels workaround.
The workaround is extended in the following ways: 1) It now applies to any texture whose base level has *ever* been attached to a FBO. 2) It applies to Adreno 5xx in addition to Adreno 4xx 3) It applies in the atlas upload code path. This workaround (and a similar one) are narrowed to GLCaps rather than Caps. Bug: skia: Change-Id: Id600e9739bb97bf6766075ea2a987fd2039e53e5 Reviewed-on: https://skia-review.googlesource.com/18150 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/gl/GrGLTexture.h')
-rw-r--r--src/gpu/gl/GrGLTexture.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLTexture.h b/src/gpu/gl/GrGLTexture.h
index 74358914ec..85ada01c87 100644
--- a/src/gpu/gl/GrGLTexture.h
+++ b/src/gpu/gl/GrGLTexture.h
@@ -66,7 +66,11 @@ public:
GrGLenum target() const { return fInfo.fTarget; }
+ bool hasBaseLevelBeenBoundToFBO() const { return fBaseLevelHasBeenBoundToFBO; }
+ void baseLevelWasBoundToFBO() { fBaseLevelHasBeenBoundToFBO = true; }
+
static sk_sp<GrGLTexture> MakeWrapped(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&);
+
protected:
// Constructor for subclasses.
GrGLTexture(GrGLGpu*, const GrSurfaceDesc&, const IDDesc&, bool wasMipMapDataProvided);
@@ -96,6 +100,7 @@ private:
// direct interaction with the GL object.
GrGLTextureInfo fInfo;
GrBackendObjectOwnership fTextureIDOwnership;
+ bool fBaseLevelHasBeenBoundToFBO = false;
ReleaseProc fReleaseProc = nullptr;
ReleaseCtx fReleaseCtx = nullptr;