Remove outdated optimization to not flush for new textures in GrSWMaskHelper
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1704593002 Review URL: https://codereview.chromium.org/1704593002
This commit is contained in:
parent
babafcc681
commit
0042245b63
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user