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

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

Issue 582033003: Fix stack-allocated GPU path object (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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 2fe9758c8a469a8a5e03fc0f509a9cbe60989de1..26584bc80872f4dffd8f864aff73478f0b8bb784 100644
--- a/src/gpu/gl/GrGLPathRendering.cpp
+++ b/src/gpu/gl/GrGLPathRendering.cpp
@@ -132,11 +132,12 @@ GrPathRange* GrGLPathRendering::createGlyphs(const SkTypeface* typeface,
const size_t numPaths = typeface->countGlyphs();
const GrGLuint basePathID = this->genPaths(numPaths);
+ SkAutoTUnref<GrGLPath> templatePath(SkNEW_ARGS(GrGLPath, (fGpu, SkPath(), stroke)));
GrGLenum status;
GL_CALL_RET(status, PathMemoryGlyphIndexArray(basePathID, GR_GL_STANDARD_FONT_FORMAT,
- fontDataLength, fontData, faceIndex, 0, numPaths,
- GrGLPath(fGpu, SkPath(), stroke).pathID(),
+ fontDataLength, fontData, faceIndex, 0,
+ numPaths, templatePath->pathID(),
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