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

Side by Side Diff: include/core/SkGeometry.h

Issue 175193003: Stub for conic section max curvature (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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 | « no previous file | src/core/SkGeometry.cpp » ('j') | src/core/SkGeometry.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 9
10 #ifndef SkGeometry_DEFINED 10 #ifndef SkGeometry_DEFINED
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 */ 248 */
249 int chopIntoQuadsPOW2(SkPoint pts[], int pow2) const; 249 int chopIntoQuadsPOW2(SkPoint pts[], int pow2) const;
250 250
251 bool findXExtrema(SkScalar* t) const; 251 bool findXExtrema(SkScalar* t) const;
252 bool findYExtrema(SkScalar* t) const; 252 bool findYExtrema(SkScalar* t) const;
253 bool chopAtXExtrema(SkConic dst[2]) const; 253 bool chopAtXExtrema(SkConic dst[2]) const;
254 bool chopAtYExtrema(SkConic dst[2]) const; 254 bool chopAtYExtrema(SkConic dst[2]) const;
255 255
256 void computeTightBounds(SkRect* bounds) const; 256 void computeTightBounds(SkRect* bounds) const;
257 void computeFastBounds(SkRect* bounds) const; 257 void computeFastBounds(SkRect* bounds) const;
258
259 bool findMaxCurvature(SkScalar* t) const;
258 }; 260 };
259 261
260 #include "SkTemplates.h" 262 #include "SkTemplates.h"
261 263
262 /** 264 /**
263 * Help class to allocate storage for approximating a conic with N quads. 265 * Help class to allocate storage for approximating a conic with N quads.
264 */ 266 */
265 class SkAutoConicToQuads { 267 class SkAutoConicToQuads {
266 public: 268 public:
267 SkAutoConicToQuads() : fQuadCount(0) {} 269 SkAutoConicToQuads() : fQuadCount(0) {}
(...skipping 30 matching lines...) Expand all
298 private: 300 private:
299 enum { 301 enum {
300 kQuadCount = 8, // should handle most conics 302 kQuadCount = 8, // should handle most conics
301 kPointCount = 1 + 2 * kQuadCount, 303 kPointCount = 1 + 2 * kQuadCount,
302 }; 304 };
303 SkAutoSTMalloc<kPointCount, SkPoint> fStorage; 305 SkAutoSTMalloc<kPointCount, SkPoint> fStorage;
304 int fQuadCount; // #quads for current usage 306 int fQuadCount; // #quads for current usage
305 }; 307 };
306 308
307 #endif 309 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkGeometry.cpp » ('j') | src/core/SkGeometry.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698