From 1c214313248a4b5a69af14539608c54fb67c2bf8 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Thu, 25 May 2017 19:28:22 +0000 Subject: [PATCH] Revert "Clear atlas textures at creation in Chrome" This reverts commit 8785df15fe5a57651597d138d3c5aea0ffe3f661. Reason for revert: Chrome bug Bug: chromium:726226 Original change's description: > 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 > Commit-Queue: Brian Salomon > TBR=bsalomon@google.com,robertphillips@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: chromium:656320 Change-Id: Ibc4dd7f184866b58481f2dc7e7e88da9169e7adc Reviewed-on: https://skia-review.googlesource.com/17988 Reviewed-by: Brian Salomon Commit-Queue: Brian Salomon --- include/gpu/GrCaps.h | 3 --- src/gpu/GrCaps.cpp | 1 - src/gpu/GrDrawOpAtlas.cpp | 4 ---- src/gpu/gl/GrGLCaps.cpp | 1 - 4 files changed, 9 deletions(-) diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h index e6034c52af..4dc776734e 100644 --- a/include/gpu/GrCaps.h +++ b/include/gpu/GrCaps.h @@ -176,8 +176,6 @@ public: /** True in environments that will issue errors if memory uploaded to buffers is not initialized (even if not read by draw calls). */ bool mustClearUploadedBufferData() const { return fMustClearUploadedBufferData; } - /** True when there is a performance cost to using an atlas that has not been cleared. */ - bool mustClearAtlases() const { return fMustClearAtlases; } bool wireframeMode() const { return fWireframeMode; } @@ -221,7 +219,6 @@ protected: bool fPreferClientSideDynamicBuffers : 1; bool fFullClearIsFree : 1; bool fMustClearUploadedBufferData : 1; - bool fMustClearAtlases : 1; // Driver workaround bool fUseDrawInsteadOfClear : 1; diff --git a/src/gpu/GrCaps.cpp b/src/gpu/GrCaps.cpp index e12af689c3..5c04d190c5 100644 --- a/src/gpu/GrCaps.cpp +++ b/src/gpu/GrCaps.cpp @@ -47,7 +47,6 @@ 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 235bc87a00..be8258ab51 100644 --- a/src/gpu/GrDrawOpAtlas.cpp +++ b/src/gpu/GrDrawOpAtlas.cpp @@ -24,10 +24,6 @@ std::unique_ptr 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 0d1d4f6fff..6276eaf1c8 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -513,7 +513,6 @@ void GrGLCaps::init(const GrContextOptions& contextOptions, if (kChromium_GrGLDriver == ctxInfo.driver()) { fMustClearUploadedBufferData = true; - fMustClearAtlases = true; } if (kGL_GrGLStandard == standard) {