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

Unified Diff: src/gpu/GrRectanizer_skyline.h

Issue 324693002: Add some comments to GrRectanizer_skyline (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/gpu/GrRectanizer_skyline.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrRectanizer_skyline.h
diff --git a/src/gpu/GrRectanizer_skyline.h b/src/gpu/GrRectanizer_skyline.h
index 2062667d7c63749240c98c1191c0b1a80b56b021..21043c0b6d18ffc40dd2cecbfa23a2fef2c69978 100644
--- a/src/gpu/GrRectanizer_skyline.h
+++ b/src/gpu/GrRectanizer_skyline.h
@@ -32,7 +32,7 @@ public:
virtual bool addRect(int w, int h, SkIPoint16* loc) SK_OVERRIDE;
- virtual float percentFull() const SK_OVERRIDE{
+ virtual float percentFull() const SK_OVERRIDE {
return fAreaSoFar / ((float)this->width() * this->height());
}
@@ -47,7 +47,13 @@ private:
int32_t fAreaSoFar;
+ // Can a width x height rectangle fit in the free space represented by
+ // the skyline segments >= 'skylineIndex'? If so, return true and fill in
+ // 'y' with the y-location at which it fits (the x location is pulled from
+ // 'skylineIndex's segment.
bool rectangleFits(int skylineIndex, int width, int height, int* y) const;
+ // Update the skyline structure to include a width x height rect located
+ // at x,y.
void addSkylineLevel(int skylineIndex, int x, int y, int width, int height);
typedef GrRectanizer INHERITED;
« no previous file with comments | « no previous file | src/gpu/GrRectanizer_skyline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698