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

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: 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/GrRectanizer_pow2.h ('k') | src/gpu/GrRectanizer_skyline.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 /* 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 10
11 bool GrRectanizerPow2::addRect(int width, int height, GrIPoint16* loc) { 11 bool GrRectanizerPow2::addRect(int width, int height, SkIPoint16* loc) {
12 if ((unsigned)width > (unsigned)this->width() || 12 if ((unsigned)width > (unsigned)this->width() ||
13 (unsigned)height > (unsigned)this->height()) { 13 (unsigned)height > (unsigned)this->height()) {
14 return false; 14 return false;
15 } 15 }
16 16
17 int32_t area = width * height; // computed here since height will be modifie d 17 int32_t area = width * height; // computed here since height will be modifie d
18 18
19 height = GrNextPow2(height); 19 height = GrNextPow2(height);
20 if (height < kMIN_HEIGHT_POW2) { 20 if (height < kMIN_HEIGHT_POW2) {
21 height = kMIN_HEIGHT_POW2; 21 height = kMIN_HEIGHT_POW2;
(...skipping 29 matching lines...) Expand all
51 fAreaSoFar += area; 51 fAreaSoFar += area;
52 return true; 52 return true;
53 } 53 }
54 54
55 /////////////////////////////////////////////////////////////////////////////// 55 ///////////////////////////////////////////////////////////////////////////////
56 56
57 // factory is now in GrRectanizer_skyline.cpp 57 // factory is now in GrRectanizer_skyline.cpp
58 //GrRectanizer* GrRectanizer::Factory(int width, int height) { 58 //GrRectanizer* GrRectanizer::Factory(int width, int height) {
59 // return SkNEW_ARGS(GrRectanizerPow2, (width, height)); 59 // return SkNEW_ARGS(GrRectanizerPow2, (width, height));
60 //} 60 //}
OLDNEW
« no previous file with comments | « src/gpu/GrRectanizer_pow2.h ('k') | src/gpu/GrRectanizer_skyline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698