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

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

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
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 "GrGpuGL.h" 10 #include "GrGpuGL.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 GR_STATIC_ASSERT(2 == SkPaint::kSquare_Cap); 80 GR_STATIC_ASSERT(2 == SkPaint::kSquare_Cap);
81 GR_STATIC_ASSERT(GR_ARRAY_COUNT(gSkCapsToGrGLCaps) == SkPaint::kCapCount); 81 GR_STATIC_ASSERT(GR_ARRAY_COUNT(gSkCapsToGrGLCaps) == SkPaint::kCapCount);
82 } 82 }
83 83
84 } 84 }
85 85
86 static const bool kIsWrapped = false; // The constructor creates the GL path obj ect. 86 static const bool kIsWrapped = false; // The constructor creates the GL path obj ect.
87 87
88 GrGLPath::GrGLPath(GrGpuGL* gpu, const SkPath& path, const SkStrokeRec& stroke) 88 GrGLPath::GrGLPath(GrGpuGL* gpu, const SkPath& path, const SkStrokeRec& stroke)
89 : INHERITED(gpu, kIsWrapped, path, stroke) { 89 : INHERITED(gpu, kIsWrapped, path, stroke) {
90 #ifndef SK_SCALAR_IS_FLOAT
91 GrCrash("Assumes scalar is float.");
92 #endif
93 SkASSERT(!path.isEmpty()); 90 SkASSERT(!path.isEmpty());
94 91
95 GL_CALL_RET(fPathID, GenPaths(1)); 92 GL_CALL_RET(fPathID, GenPaths(1));
96 93
97 SkSTArray<16, GrGLubyte, true> pathCommands; 94 SkSTArray<16, GrGLubyte, true> pathCommands;
98 SkSTArray<16, SkPoint, true> pathPoints; 95 SkSTArray<16, SkPoint, true> pathPoints;
99 96
100 int verbCnt = fSkPath.countVerbs(); 97 int verbCnt = fSkPath.countVerbs();
101 int pointCnt = fSkPath.countPoints(); 98 int pointCnt = fSkPath.countPoints();
102 pathCommands.resize_back(verbCnt); 99 pathCommands.resize_back(verbCnt);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 } 140 }
144 141
145 INHERITED::onRelease(); 142 INHERITED::onRelease();
146 } 143 }
147 144
148 void GrGLPath::onAbandon() { 145 void GrGLPath::onAbandon() {
149 fPathID = 0; 146 fPathID = 0;
150 147
151 INHERITED::onAbandon(); 148 INHERITED::onAbandon();
152 } 149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698