Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Unified Diff: src/gpu/GrSWMaskHelper.cpp

Issue 1704593002: Remove outdated optimization to not flush for new textures in GrSWMaskHelper (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrSWMaskHelper.cpp
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index 34e44952863a62e44cafb4073da11a65b17ff8dc..211550a4252d543f3c615f3eac410fae5b0d37b2 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -252,17 +252,11 @@ GrTexture* GrSWMaskHelper::createTexture() {
void GrSWMaskHelper::sendTextureData(GrTexture *texture, const GrSurfaceDesc& desc,
const void *data, size_t rowbytes) {
- // If we aren't reusing scratch textures we don't need to flush before
- // writing since no one else will be using 'texture'
- bool reuseScratch = fContext->caps()->reuseScratchTextures();
-
// Since we're uploading to it, and it's compressed, 'texture' shouldn't
// have a render target.
SkASSERT(nullptr == texture->asRenderTarget());
- texture->writePixels(0, 0, desc.fWidth, desc.fHeight,
- desc.fConfig, data, rowbytes,
- reuseScratch ? 0 : GrContext::kDontFlush_PixelOpsFlag);
+ texture->writePixels(0, 0, desc.fWidth, desc.fHeight, desc.fConfig, data, rowbytes);
}
void GrSWMaskHelper::compressTextureData(GrTexture *texture, const GrSurfaceDesc& desc) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698