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

Unified Diff: src/gpu/gl/GrGLProgram.cpp

Issue 812063002: Change to create device coord coordset (Closed) Base URL: https://skia.googlesource.com/skia.git@vm-off-context
Patch Set: Created 6 years 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/gl/GrGLProgram.cpp
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 0f4b70de2b235d8a8e4ca50eb6c73829fbeae208..fbcb074798677a257bafc0b8b2b5fce872952035 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -31,8 +31,10 @@ static SkMatrix get_transform_matrix(const GrPendingFragmentStage& stage, int tr
const GrCoordTransform& coordTransform = stage.getProcessor()->coordTransform(transformIdx);
SkMatrix combined;
- if (kLocal_GrCoordSet == coordTransform.sourceCoords()) {
- // If we have explicit local coords then we shouldn't need a coord change.
+ if (kLocal_GrCoordSet == coordTransform.sourceCoords() ||
+ kDevice_GrCoordSet == coordTransform.sourceCoords()) {
bsalomon 2014/12/17 19:45:28 backwards... don't apply ccm if using device coord
+ // If we have explicit local coords or are in device coords then we shouldn't need a coord
+ // change.
const SkMatrix& ccm = stage.getCoordChangeMatrix();
combined.setConcat(coordTransform.getMatrix(), ccm);
} else {

Powered by Google App Engine
This is Rietveld 408576698