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

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

Issue 450283002: Simplify GrGLPathRendering interface (Closed) Base URL: https://skia.googlesource.com/skia.git@02-path-state-to-pathrendering-class
Patch Set: rebase Created 6 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 | « no previous file | src/gpu/gl/GrGLPathRange.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLPath.cpp
diff --git a/src/gpu/gl/GrGLPath.cpp b/src/gpu/gl/GrGLPath.cpp
index 930ec4a8f67b1938403a96ff965793f3a70239e8..8c76b5922a5917e2e3c31544c490c3caeb1fba96 100644
--- a/src/gpu/gl/GrGLPath.cpp
+++ b/src/gpu/gl/GrGLPath.cpp
@@ -85,7 +85,6 @@ void GrGLPath::InitPathObject(GrGpuGL* gpu,
GrGLuint pathID,
const SkPath& skPath,
const SkStrokeRec& stroke) {
- GrGLPathRendering* pr = gpu->glPathRendering();
SkSTArray<16, GrGLubyte, true> pathCommands;
SkSTArray<16, SkPoint, true> pathPoints;
@@ -106,16 +105,23 @@ void GrGLPath::InitPathObject(GrGpuGL* gpu,
}
SkASSERT(pathPoints.count() == numPts);
- pr->pathCommands(pathID, verbCnt, &pathCommands[0], 2 * pointCnt, GR_GL_FLOAT, &pathPoints[0]);
+ GR_GL_CALL(gpu->glInterface(),
+ PathCommands(pathID, verbCnt, &pathCommands[0],
+ 2 * pointCnt, GR_GL_FLOAT, &pathPoints[0]));
if (stroke.needToApply()) {
SkASSERT(!stroke.isHairlineStyle());
- pr->pathParameterf(pathID, GR_GL_PATH_STROKE_WIDTH, SkScalarToFloat(stroke.getWidth()));
- pr->pathParameterf(pathID, GR_GL_PATH_MITER_LIMIT, SkScalarToFloat(stroke.getMiter()));
+ GR_GL_CALL(gpu->glInterface(),
+ PathParameterf(pathID, GR_GL_PATH_STROKE_WIDTH, SkScalarToFloat(stroke.getWidth())));
+ GR_GL_CALL(gpu->glInterface(),
+ PathParameterf(pathID, GR_GL_PATH_MITER_LIMIT, SkScalarToFloat(stroke.getMiter())));
GrGLenum join = join_to_gl_join(stroke.getJoin());
- pr->pathParameteri(pathID, GR_GL_PATH_JOIN_STYLE, join);
+ GR_GL_CALL(gpu->glInterface(),
+ PathParameteri(pathID, GR_GL_PATH_JOIN_STYLE, join));
GrGLenum cap = cap_to_gl_cap(stroke.getCap());
- pr->pathParameteri(pathID, GR_GL_PATH_INITIAL_END_CAP, cap);
- pr->pathParameteri(pathID, GR_GL_PATH_TERMINAL_END_CAP, cap);
+ GR_GL_CALL(gpu->glInterface(),
+ PathParameteri(pathID, GR_GL_PATH_INITIAL_END_CAP, cap));
+ GR_GL_CALL(gpu->glInterface(),
+ PathParameteri(pathID, GR_GL_PATH_TERMINAL_END_CAP, cap));
}
}
« no previous file with comments | « no previous file | src/gpu/gl/GrGLPathRange.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698