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

Side by Side Diff: src/gpu/GrRectanizer_pow2.cpp

Issue 309683002: Move GrIPoint16 to SkIPoint16 (and remove GrPoint.h) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 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 "GrRectanizer_pow2.h" 9 #include "GrRectanizer_pow2.h"
10 #include "GrTypes.h"
10 #include "GrTBSearch.h" 11 #include "GrTBSearch.h"
11 12
12 bool GrRectanizerPow2::addRect(int width, int height, GrIPoint16* loc) { 13 bool GrRectanizerPow2::addRect(int width, int height, SkIPoint16* loc) {
13 if ((unsigned)width > (unsigned)this->width() || 14 if ((unsigned)width > (unsigned)this->width() ||
14 (unsigned)height > (unsigned)this->height()) { 15 (unsigned)height > (unsigned)this->height()) {
15 return false; 16 return false;
16 } 17 }
17 18
18 int32_t area = width * height; 19 int32_t area = width * height;
19 20
20 /* 21 /*
21 We use bsearch, but there may be more than one row with the same height, 22 We use bsearch, but there may be more than one row with the same height,
22 so we actually search for height-1, which can only be a pow2 itself if 23 so we actually search for height-1, which can only be a pow2 itself if
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 fAreaSoFar += area; 58 fAreaSoFar += area;
58 return true; 59 return true;
59 } 60 }
60 61
61 /////////////////////////////////////////////////////////////////////////////// 62 ///////////////////////////////////////////////////////////////////////////////
62 63
63 // factory is now in GrRectanizer_skyline.cpp 64 // factory is now in GrRectanizer_skyline.cpp
64 //GrRectanizer* GrRectanizer::Factory(int width, int height) { 65 //GrRectanizer* GrRectanizer::Factory(int width, int height) {
65 // return SkNEW_ARGS(GrRectanizerPow2, (width, height)); 66 // return SkNEW_ARGS(GrRectanizerPow2, (width, height));
66 //} 67 //}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698