diff options
author | 2017-05-24 10:07:30 -0400 | |
---|---|---|
committer | 2017-05-24 16:04:45 +0000 | |
commit | 8785df15fe5a57651597d138d3c5aea0ffe3f661 (patch) | |
tree | 0770ceaa9b46105235a19ab3dfa2d608cce3d6eb /src | |
parent | 5458cf8ec62c548480d5bb142afa71e4269ddac9 (diff) |
Clear atlas textures at creation in Chrome
Bug: chromium:656320
Change-Id: Ia65274aa733f199be188579821e745920493aefc
Reviewed-on: https://skia-review.googlesource.com/17824
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrCaps.cpp | 1 | ||||
-rw-r--r-- | src/gpu/GrDrawOpAtlas.cpp | 4 | ||||
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrCaps.cpp b/src/gpu/GrCaps.cpp index 5c04d190c5..e12af689c3 100644 --- a/src/gpu/GrCaps.cpp +++ b/src/gpu/GrCaps.cpp @@ -47,6 +47,7 @@ GrCaps::GrCaps(const GrContextOptions& options) { fPreferClientSideDynamicBuffers = false; fFullClearIsFree = false; fMustClearUploadedBufferData = false; + fMustClearAtlases = false; fSampleShadingSupport = false; fFenceSyncSupport = false; fCrossContextTextureSupport = false; diff --git a/src/gpu/GrDrawOpAtlas.cpp b/src/gpu/GrDrawOpAtlas.cpp index be8258ab51..235bc87a00 100644 --- a/src/gpu/GrDrawOpAtlas.cpp +++ b/src/gpu/GrDrawOpAtlas.cpp @@ -24,6 +24,10 @@ std::unique_ptr<GrDrawOpAtlas> GrDrawOpAtlas::Make(GrContext* ctx, GrPixelConfig desc.fHeight = height; desc.fConfig = config; + if (ctx->caps()->mustClearAtlases()) { + desc.fFlags |= kPerformInitialClear_GrSurfaceFlag; + } + // We don't want to flush the context so we claim we're in the middle of flushing so as to // guarantee we do not recieve a texture with pending IO // TODO: Determine how to avoid having to do this. (https://bug.skia.org/4156) diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 8c4330312d..9fb8db42e5 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -495,6 +495,7 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, if (kChromium_GrGLDriver == ctxInfo.driver()) { fMustClearUploadedBufferData = true; + fMustClearAtlases = true; } if (kGL_GrGLStandard == standard) { |