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

Side by Side Diff: src/gpu/gl/GrGLPath.cpp

Issue 563283004: Use per-typeface sets of glyphs for nvpr text (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_glyphmemorypath
Patch Set: Fix builds 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/gl/GrGLPathRange.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrGLPath.h" 9 #include "GrGLPath.h"
10 #include "GrGLPathRendering.h" 10 #include "GrGLPathRendering.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 for (int i = 0; i < verbCnt; ++i) { 102 for (int i = 0; i < verbCnt; ++i) {
103 SkPath::Verb v = static_cast<SkPath::Verb>(pathCommands[i]); 103 SkPath::Verb v = static_cast<SkPath::Verb>(pathCommands[i]);
104 pathCommands[i] = verb_to_gl_path_cmd(v); 104 pathCommands[i] = verb_to_gl_path_cmd(v);
105 SkDEBUGCODE(numPts += num_pts(v)); 105 SkDEBUGCODE(numPts += num_pts(v));
106 } 106 }
107 SkASSERT(pathPoints.count() == numPts); 107 SkASSERT(pathPoints.count() == numPts);
108 108
109 GR_GL_CALL(gpu->glInterface(), 109 GR_GL_CALL(gpu->glInterface(),
110 PathCommands(pathID, verbCnt, &pathCommands[0], 110 PathCommands(pathID, verbCnt, &pathCommands[0],
111 2 * pointCnt, GR_GL_FLOAT, &pathPoints[0])); 111 2 * pointCnt, GR_GL_FLOAT, &pathPoints[0]));
112 } else {
113 GR_GL_CALL(gpu->glInterface(), PathCommands(pathID, 0, NULL, 0, GR_GL_FL OAT, NULL));
112 } 114 }
113 115
114 if (stroke.needToApply()) { 116 if (stroke.needToApply()) {
115 SkASSERT(!stroke.isHairlineStyle()); 117 SkASSERT(!stroke.isHairlineStyle());
116 GR_GL_CALL(gpu->glInterface(), 118 GR_GL_CALL(gpu->glInterface(),
117 PathParameterf(pathID, GR_GL_PATH_STROKE_WIDTH, SkScalarToFloat(stro ke.getWidth()))); 119 PathParameterf(pathID, GR_GL_PATH_STROKE_WIDTH, SkScalarToFloat(stro ke.getWidth())));
118 GR_GL_CALL(gpu->glInterface(), 120 GR_GL_CALL(gpu->glInterface(),
119 PathParameterf(pathID, GR_GL_PATH_MITER_LIMIT, SkScalarToFloat(strok e.getMiter()))); 121 PathParameterf(pathID, GR_GL_PATH_MITER_LIMIT, SkScalarToFloat(strok e.getMiter())));
120 GrGLenum join = join_to_gl_join(stroke.getJoin()); 122 GrGLenum join = join_to_gl_join(stroke.getJoin());
121 GR_GL_CALL(gpu->glInterface(), 123 GR_GL_CALL(gpu->glInterface(),
(...skipping 30 matching lines...) Expand all
152 } 154 }
153 155
154 INHERITED::onRelease(); 156 INHERITED::onRelease();
155 } 157 }
156 158
157 void GrGLPath::onAbandon() { 159 void GrGLPath::onAbandon() {
158 fPathID = 0; 160 fPathID = 0;
159 161
160 INHERITED::onAbandon(); 162 INHERITED::onAbandon();
161 } 163 }
OLDNEW
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/gl/GrGLPathRange.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698