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

Unified Diff: src/gpu/GrRectanizer_pow2.cpp

Issue 303263005: Add Sample slide for Rectanizers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comment change Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrRectanizer_pow2.h ('k') | src/gpu/GrRectanizer_skyline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrRectanizer_pow2.cpp
diff --git a/src/gpu/GrRectanizer_pow2.cpp b/src/gpu/GrRectanizer_pow2.cpp
index d92e80c2d55bb2a6167a7f734ccf360a191b724f..5da7e04528ede7934e9b79962e348a24e2390631 100644
--- a/src/gpu/GrRectanizer_pow2.cpp
+++ b/src/gpu/GrRectanizer_pow2.cpp
@@ -7,7 +7,6 @@
*/
#include "GrRectanizer_pow2.h"
-#include "GrTBSearch.h"
bool GrRectanizerPow2::addRect(int width, int height, GrIPoint16* loc) {
if ((unsigned)width > (unsigned)this->width() ||
@@ -15,13 +14,8 @@ bool GrRectanizerPow2::addRect(int width, int height, GrIPoint16* loc) {
return false;
}
- int32_t area = width * height;
+ int32_t area = width * height; // computed here since height will be modified
- /*
- We use bsearch, but there may be more than one row with the same height,
- so we actually search for height-1, which can only be a pow2 itself if
- height == 2. Thus we set a minimum height.
- */
height = GrNextPow2(height);
if (height < kMIN_HEIGHT_POW2) {
height = kMIN_HEIGHT_POW2;
« 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