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

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

Issue 1146983004: Avoid creating GrGLPath to the resource cache when creating GrGLPathRanges (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLPathRendering.cpp
diff --git a/src/gpu/gl/GrGLPathRendering.cpp b/src/gpu/gl/GrGLPathRendering.cpp
index 3ceb87692ac9e7b51964ba2c08985faefa53c246..e000f03102fdcb27adaa899edfb1680627b90ead 100644
--- a/src/gpu/gl/GrGLPathRendering.cpp
+++ b/src/gpu/gl/GrGLPathRendering.cpp
@@ -131,12 +131,14 @@ GrPathRange* GrGLPathRendering::createGlyphs(const SkTypeface* typeface,
const int numPaths = typeface->countGlyphs();
const GrGLuint basePathID = this->genPaths(numPaths);
- SkAutoTUnref<GrGLPath> templatePath(SkNEW_ARGS(GrGLPath, (fGpu, SkPath(), stroke)));
+
+ // Init the basePathID as the template path.
+ GrGLPath::InitPathObject(fGpu, basePathID, SkPath(), stroke);
GrGLenum status;
GL_CALL_RET(status, PathMemoryGlyphIndexArray(basePathID, GR_GL_STANDARD_FONT_FORMAT,
fontDataLength, fontData, faceIndex, 0,
- numPaths, templatePath->pathID(),
+ numPaths, basePathID,
SkPaint::kCanonicalTextSizeForPaths));
if (GR_GL_FONT_GLYPHS_AVAILABLE != status) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698