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

Unified Diff: util.h

Issue 6902072: wm: Update a lot of code to use structs from geometry.h. (Closed) Base URL: ssh://gitrw.chromium.org:9222/window_manager.git@master
Patch Set: move override-redirect stacking and visibility into Window Created 9 years, 8 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 | « transient_window_collection.cc ('k') | util.cc » ('j') | window.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util.h
diff --git a/util.h b/util.h
index 24c8dd1cad954e7d45c7a5b20a88a718ead8e7a3..cd637f30b0207cb02b19b9e3ffc838ab41e6df3f 100644
--- a/util.h
+++ b/util.h
@@ -15,6 +15,7 @@
#include "base/hash_tables.h"
#include "base/logging.h"
#include "base/time.h"
+#include "window_manager/geometry.h"
namespace window_manager {
@@ -151,11 +152,10 @@ class Stacker {
// ByteMap unions rectangles into a 2-D array of bytes. That's it. :-P
class ByteMap {
public:
- ByteMap(int width, int height);
+ ByteMap(const Size& size);
~ByteMap();
- int width() const { return width_; }
- int height() const { return height_; }
+ const Size& size() const { return size_; }
const unsigned char* bytes() const { return bytes_; }
// Copy the bytes from |other|, which must have the same dimensions as
@@ -166,16 +166,13 @@ class ByteMap {
void Clear(unsigned char value);
// Set the bytes covered by the passed-in rectangle.
- void SetRectangle(int rect_x, int rect_y,
- int rect_width, int rect_height,
- unsigned char value);
+ void SetRectangle(const Rect& rect, unsigned char value);
// Check if the bytes from |other| match the bytes from this.
bool operator==(const ByteMap& other);
private:
- int width_;
- int height_;
+ Size size_;
unsigned char* bytes_;
DISALLOW_COPY_AND_ASSIGN(ByteMap);
« no previous file with comments | « transient_window_collection.cc ('k') | util.cc » ('j') | window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698