aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDefaultGeoProcFactory.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-07-28 10:20:08 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-28 10:20:08 -0700
commit7a0d697ed69610efac1b964896edfc9bd869243c (patch)
tree3cbef75be2931fdaa642b81a55683a76064a065e /src/gpu/GrDefaultGeoProcFactory.h
parent0d986d877edae36ad7dc6fbdbc69a56ca9372702 (diff)
Change GrDefaultGeoProcFactory to a namespace
Diffstat (limited to 'src/gpu/GrDefaultGeoProcFactory.h')
-rw-r--r--src/gpu/GrDefaultGeoProcFactory.h37
1 files changed, 18 insertions, 19 deletions
diff --git a/src/gpu/GrDefaultGeoProcFactory.h b/src/gpu/GrDefaultGeoProcFactory.h
index 243685439d..bdefd4a920 100644
--- a/src/gpu/GrDefaultGeoProcFactory.h
+++ b/src/gpu/GrDefaultGeoProcFactory.h
@@ -18,8 +18,7 @@ class GrDrawState;
* used in the creation of optimized draw states because adding default GPs to the drawstate can
* interfere with batching due to updating the drawstate.
*/
-class GrDefaultGeoProcFactory {
-public:
+namespace GrDefaultGeoProcFactory {
// Structs for adding vertex attributes
struct PositionAttr {
SkPoint fPosition;
@@ -125,31 +124,31 @@ public:
const SkMatrix* fMatrix;
};
- static const GrGeometryProcessor* Create(const Color&,
- const Coverage&,
- const LocalCoords&,
- const SkMatrix& viewMatrix = SkMatrix::I());
+ const GrGeometryProcessor* Create(const Color&,
+ const Coverage&,
+ const LocalCoords&,
+ const SkMatrix& viewMatrix = SkMatrix::I());
/*
* Use this factory to create a GrGeometryProcessor that expects a device space vertex position
* attribute. The view matrix must still be provided to compute correctly transformed
* coordinates for GrFragmentProcessors. It may fail if the view matrix is not invertible.
*/
- static const GrGeometryProcessor* CreateForDeviceSpace(const Color&,
- const Coverage&,
- const LocalCoords&,
- const SkMatrix& viewMatrix);
+ const GrGeometryProcessor* CreateForDeviceSpace(const Color&,
+ const Coverage&,
+ const LocalCoords&,
+ const SkMatrix& viewMatrix);
// TODO deprecate this
- static const GrGeometryProcessor* Create(uint32_t gpTypeFlags,
- GrColor,
- bool localCoordsWillBeRead,
- bool coverageWillBeIgnored,
- const SkMatrix& viewMatrix = SkMatrix::I(),
- const SkMatrix& localMatrix = SkMatrix::I(),
- uint8_t coverage = 0xff);
-
- static size_t DefaultVertexStride() { return sizeof(PositionAttr); }
+ const GrGeometryProcessor* Create(uint32_t gpTypeFlags,
+ GrColor,
+ bool localCoordsWillBeRead,
+ bool coverageWillBeIgnored,
+ const SkMatrix& viewMatrix = SkMatrix::I(),
+ const SkMatrix& localMatrix = SkMatrix::I(),
+ uint8_t coverage = 0xff);
+
+ inline size_t DefaultVertexStride() { return sizeof(PositionAttr); }
};
#endif