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

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

Issue 812063002: Change to create device coord coordset (Closed) Base URL: https://skia.googlesource.com/skia.git@vm-off-context
Patch Set: ignoring bleed 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
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgramDesc.cpp
diff --git a/src/gpu/gl/GrGLProgramDesc.cpp b/src/gpu/gl/GrGLProgramDesc.cpp
index 06377c758ecde8ab1966b315c71fa75b7b6cff46..6e3128ceaf05f117b721f514c3d92ae0edad1ffd 100644
--- a/src/gpu/gl/GrGLProgramDesc.cpp
+++ b/src/gpu/gl/GrGLProgramDesc.cpp
@@ -52,8 +52,9 @@ enum {
kPrecisionShift = kMatrixTypeKeyBits,
kPositionCoords_Flag = (1 << (kPrecisionShift + kPrecisionBits)),
+ kDeviceCoords_Flag = kPositionCoords_Flag + kPositionCoords_Flag,
- kTransformKeyBits = kMatrixTypeKeyBits + kPrecisionBits + 1,
+ kTransformKeyBits = kMatrixTypeKeyBits + kPrecisionBits + 2,
};
GR_STATIC_ASSERT(kHigh_GrSLPrecision < (1 << kPrecisionBits));
@@ -78,8 +79,10 @@ static uint32_t gen_transform_key(const GrPendingFragmentStage& stage, bool useE
}
const GrCoordTransform& coordTransform = stage.getProcessor()->coordTransform(t);
- if (kLocal_GrCoordSet != coordTransform.sourceCoords() && useExplicitLocalCoords) {
+ if (kLocal_GrCoordSet == coordTransform.sourceCoords() && !useExplicitLocalCoords) {
key |= kPositionCoords_Flag;
+ } else if (kDevice_GrCoordSet == coordTransform.sourceCoords()) {
+ key |= kDeviceCoords_Flag;
}
GR_STATIC_ASSERT(kGrSLPrecisionCount <= (1 << kPrecisionBits));
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698