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

Unified Diff: src/gpu/GrDefaultGeoProcFactory.cpp

Issue 1261083003: Use new API everywhere for GrDefaultGeoProcFactory (Closed) Base URL: https://skia.googlesource.com/skia.git@lccleanup2
Patch Set: tweaks Created 5 years, 4 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
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.h ('k') | src/gpu/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDefaultGeoProcFactory.cpp
diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp
index 68fcd055764fa962e3bc51531f0b2ba39db61a7d..639a593220c68fbf56b099517084e373434597bc 100644
--- a/src/gpu/GrDefaultGeoProcFactory.cpp
+++ b/src/gpu/GrDefaultGeoProcFactory.cpp
@@ -258,22 +258,6 @@ GrGeometryProcessor* DefaultGeoProc::TestCreate(GrProcessorTestData* d) {
GrRandomCoverage(d->fRandom));
}
-const GrGeometryProcessor* GrDefaultGeoProcFactory::Create(uint32_t gpTypeFlags,
- GrColor color,
- bool localCoordsWillBeRead,
- bool coverageWillBeIgnored,
- const SkMatrix& viewMatrix,
- const SkMatrix& localMatrix,
- uint8_t coverage) {
- return DefaultGeoProc::Create(gpTypeFlags,
- color,
- viewMatrix,
- localMatrix,
- localCoordsWillBeRead,
- coverageWillBeIgnored,
- coverage);
-}
-
const GrGeometryProcessor* GrDefaultGeoProcFactory::Create(const Color& color,
const Coverage& coverage,
const LocalCoords& localCoords,
@@ -302,17 +286,19 @@ const GrGeometryProcessor* GrDefaultGeoProcFactory::CreateForDeviceSpace(
const Coverage& coverage,
const LocalCoords& localCoords,
const SkMatrix& viewMatrix) {
- SkASSERT(LocalCoords::kUsePosition_Type == localCoords.fType);
SkMatrix invert = SkMatrix::I();
- if (!viewMatrix.isIdentity() && !viewMatrix.invert(&invert)) {
- SkDebugf("Could not invert\n");
- return NULL;
- }
+ if (LocalCoords::kUnused_Type != localCoords.fType) {
+ SkASSERT(LocalCoords::kUsePosition_Type == localCoords.fType);
+ if (!viewMatrix.isIdentity() && !viewMatrix.invert(&invert)) {
+ SkDebugf("Could not invert\n");
+ return NULL;
+ }
- if (localCoords.hasLocalMatrix()) {
- invert.preConcat(*localCoords.fMatrix);
+ if (localCoords.hasLocalMatrix()) {
+ invert.preConcat(*localCoords.fMatrix);
+ }
}
LocalCoords inverted(LocalCoords::kUsePosition_Type, &invert);
- return Create(color, coverage, inverted);
+ return Create(color, coverage, inverted, SkMatrix::I());
}
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.h ('k') | src/gpu/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698