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

Side by Side Diff: src/gpu/GrRectanizer.h

Issue 309683002: Move GrIPoint16 to SkIPoint16 (and remove GrPoint.h) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 6 years, 6 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/GrPlotMgr.h ('k') | src/gpu/GrRectanizer_pow2.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 * Copyright 2010 Google Inc. 2 * Copyright 2010 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 GrRectanizer_DEFINED 8 #ifndef GrRectanizer_DEFINED
9 #define GrRectanizer_DEFINED 9 #define GrRectanizer_DEFINED
10 10
11 #include "GrPoint.h" 11 #include "GrTypes.h"
12
13 struct SkIPoint16;
12 14
13 class GrRectanizer { 15 class GrRectanizer {
14 public: 16 public:
15 GrRectanizer(int width, int height) : fWidth(width), fHeight(height) { 17 GrRectanizer(int width, int height) : fWidth(width), fHeight(height) {
16 SkASSERT(width >= 0); 18 SkASSERT(width >= 0);
17 SkASSERT(height >= 0); 19 SkASSERT(height >= 0);
18 } 20 }
19 21
20 virtual ~GrRectanizer() {} 22 virtual ~GrRectanizer() {}
21 23
22 virtual void reset() = 0; 24 virtual void reset() = 0;
23 25
24 int width() const { return fWidth; } 26 int width() const { return fWidth; }
25 int height() const { return fHeight; } 27 int height() const { return fHeight; }
26 28
27 // Attempt to add a rect. Return true on success; false on failure. If 29 // Attempt to add a rect. Return true on success; false on failure. If
28 // successful the position in the atlas is returned in 'loc'. 30 // successful the position in the atlas is returned in 'loc'.
29 virtual bool addRect(int width, int height, GrIPoint16* loc) = 0; 31 virtual bool addRect(int width, int height, SkIPoint16* loc) = 0;
30 virtual float percentFull() const = 0; 32 virtual float percentFull() const = 0;
31 33
32 /** 34 /**
33 * Our factory, which returns the subclass du jour 35 * Our factory, which returns the subclass du jour
34 */ 36 */
35 static GrRectanizer* Factory(int width, int height); 37 static GrRectanizer* Factory(int width, int height);
36 38
37 private: 39 private:
38 int fWidth; 40 int fWidth;
39 int fHeight; 41 int fHeight;
40 }; 42 };
41 43
42 #endif 44 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPlotMgr.h ('k') | src/gpu/GrRectanizer_pow2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698