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

Unified Diff: src/gpu/GrBitmapTextContext.cpp

Issue 740463002: fix for use of uninit variable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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 | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | src/gpu/GrDistanceFieldTextContext.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBitmapTextContext.cpp
diff --git a/src/gpu/GrBitmapTextContext.cpp b/src/gpu/GrBitmapTextContext.cpp
index f22b7608a6796d711a82f93bdfe09004663af4f7..2ff410e5cf278ca6b89c58e382c44af8b22f1720 100755
--- a/src/gpu/GrBitmapTextContext.cpp
+++ b/src/gpu/GrBitmapTextContext.cpp
@@ -548,12 +548,12 @@ void GrBitmapTextContext::flush() {
return;
}
- GrDrawState drawState;
- drawState.setFromPaint(fPaint, SkMatrix::I(), fContext->getRenderTarget());
+ if (fCurrVertex > 0) {
+ GrDrawState drawState;
+ drawState.setFromPaint(fPaint, SkMatrix::I(), fContext->getRenderTarget());
- set_vertex_attributes(&drawState, fCurrMaskFormat);
+ set_vertex_attributes(&drawState, fCurrMaskFormat);
- if (fCurrVertex > 0) {
// setup our sampler state for our text texture/atlas
SkASSERT(SkIsAlign4(fCurrVertex));
SkASSERT(fCurrTexture);
« no previous file with comments | « no previous file | src/gpu/GrDistanceFieldTextContext.cpp » ('j') | src/gpu/GrDistanceFieldTextContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698