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

Unified Diff: src/gpu/GrSWMaskHelper.cpp

Issue 19789006: Fix texture allocation in SWMaskHelper (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Remove more code Created 7 years, 5 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 | « src/gpu/GrSWMaskHelper.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrSWMaskHelper.cpp
===================================================================
--- src/gpu/GrSWMaskHelper.cpp (revision 10193)
+++ src/gpu/GrSWMaskHelper.cpp (working copy)
@@ -130,22 +130,9 @@
/**
* Move the result of the software mask generation back to the gpu
*/
-void GrSWMaskHelper::toTexture(GrTexture *texture, uint8_t alpha) {
+void GrSWMaskHelper::toTexture(GrTexture *texture) {
SkAutoLockPixels alp(fBM);
- // The destination texture is almost always larger than "fBM". Clear
- // it appropriately so we don't get mask artifacts outside of the path's
- // bounding box
-
- // "texture" needs to be installed as the render target for the clear
- // and the texture upload but cannot remain the render target upon
- // return. Callers typically use it as a texture and it would then
- // be both source and dest.
- GrDrawState::AutoRenderTargetRestore artr(fContext->getGpu()->drawState(),
- texture->asRenderTarget());
-
- fContext->getGpu()->clear(NULL, GrColorPackRGBA(alpha, alpha, alpha, alpha));
-
texture->writePixels(0, 0, fBM.width(), fBM.height(),
kAlpha_8_GrPixelConfig,
fBM.getPixels(), fBM.rowBytes());
@@ -177,7 +164,7 @@
return NULL;
}
- helper.toTexture(ast.texture(), 0x00);
+ helper.toTexture(ast.texture());
return ast.detach();
}
« no previous file with comments | « src/gpu/GrSWMaskHelper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698