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

Unified Diff: src/gpu/GrContext.cpp

Issue 15780002: Replace GrDrawState::AutoDeviceCoordDraw with GrDrawState::AutoViewMatrixRestore::setIdentity(). s (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: undo unrelated change Created 7 years, 7 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
Index: src/gpu/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index d25709f0ea8c544017a258ff9a6f79e2c1912dce..17a406dba3144d20d34f16eac4986a8304d011b3 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -787,8 +787,8 @@ void GrContext::drawRect(const GrPaint& paint,
&combinedMatrix, &devRect,
&useVertexCoverage);
if (doAA) {
- GrDrawState::AutoDeviceCoordDraw adcd(target->drawState());
- if (!adcd.succeeded()) {
+ GrDrawState::AutoViewMatrixRestore avmr;
+ if (!avmr.setIdentity(target->drawState())) {
return;
}
if (width >= 0) {
@@ -1066,14 +1066,15 @@ void GrContext::drawPath(const GrPaint& paint, const SkPath& path, const SkStrok
SkRect rects[2];
if (is_nested_rects(target, path, stroke, rects, &useVertexCoverage)) {
- GrDrawState::AutoDeviceCoordDraw adcd(target->drawState());
- if (!adcd.succeeded()) {
+ SkMatrix origViewMatrix = target->getDrawState().getViewMatrix();
+ GrDrawState::AutoViewMatrixRestore avmr;
+ if (!avmr.setIdentity(target->drawState())) {
return;
}
fAARectRenderer->fillAANestedRects(this->getGpu(), target,
rects,
- adcd.getOriginalMatrix(),
+ origViewMatrix,
useVertexCoverage);
return;
}

Powered by Google App Engine
This is Rietveld 408576698