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

Side by Side Diff: src/utils/SkPatchUtils.h

Issue 463493002: SkCanvas::drawPatch param SkPoint[12] (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkPatchUtils_DEFINED 8 #ifndef SkPatchUtils_DEFINED
9 #define SkPatchUtils_DEFINED 9 #define SkPatchUtils_DEFINED
10 10
11 #include "SkPatch.h" 11 #include "SkPatch.h"
12 #include "SkMatrix.h" 12 #include "SkMatrix.h"
13 13
14 class SK_API SkPatchUtils { 14 class SK_API SkPatchUtils {
15 15
16 public: 16 public:
17 /** 17 /**
18 * Method that calculates a level of detail (number of subdivisions) for a p atch in both axis. 18 * Method that calculates a level of detail (number of subdivisions) for a p atch in both axis.
19 */ 19 */
20 static SkISize GetLevelOfDetail(const SkPatch& patch, const SkMatrix* matrix ); 20 static SkISize GetLevelOfDetail(const SkPoint cubics[12], const SkMatrix* ma trix);
21 static void getTopCubic(const SkPoint cubics[12], SkPoint points[4]);
22 static void getBottomCubic(const SkPoint cubics[12], SkPoint points[4]);
23 static void getLeftCubic(const SkPoint cubics[12], SkPoint points[4]);
24 static void getRightCubic(const SkPoint cubics[12], SkPoint points[4]);
25 static bool getVertexData(SkPatch::VertexData* data, const SkPoint cubics[12 ],
26 const SkColor colors[4], const SkPoint texCoords[4 ],
27 int lodX, int lodY);
21 }; 28 };
22 29
23 #endif 30 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698