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/GrContext.cpp

Issue 724443002: Fix use of NULL ptr in GrContext::drawRect (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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index da35033b77a5931ec4c09388abdcbc5fde8a7105..3a93404af17832b421c94bc3f8df1ed08cb81a73 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -766,17 +766,14 @@ void GrContext::drawRect(const GrPaint& paint,
!target->getDrawState().getRenderTarget()->isMultisampled();
bool doAA = needAA && apply_aa_to_rect(target, rect, width, matrix, &devBoundRect);
- const SkStrokeRec& strokeRec = strokeInfo->getStrokeRec();
-
if (doAA) {
GrDrawState::AutoViewMatrixRestore avmr;
if (!avmr.setIdentity(target->drawState())) {
return;
}
if (width >= 0) {
- fAARectRenderer->strokeAARect(target, rect,
- matrix, devBoundRect,
- strokeRec);
+ const SkStrokeRec& strokeRec = strokeInfo->getStrokeRec();
+ fAARectRenderer->strokeAARect(target, rect, matrix, devBoundRect, strokeRec);
} else {
// filled AA rect
fAARectRenderer->fillAARect(target,
« 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