Use SkRegion (set of rectangles) to record damaged rects
instead of unifying them into single rect.
BUG=none
TEST=non
Review URL: http://codereview.chromium.org/9609020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125125 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ui/gfx/compositor/layer.h b/ui/gfx/compositor/layer.h
index d4efc38..e5c4134 100644
--- a/ui/gfx/compositor/layer.h
+++ b/ui/gfx/compositor/layer.h
@@ -14,6 +14,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "third_party/skia/include/core/SkColor.h"
+#include "third_party/skia/include/core/SkRegion.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebContentLayerClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebLayer.h"
#include "ui/gfx/rect.h"
@@ -185,8 +186,9 @@
// SchedulePaint() for that.
void ScheduleDraw();
- // Sends damaged rect to |compostior_| to repaint the content.
- void SendDamagedRect();
+ // Sends damaged rectangles recorded in |damaged_region_| to
+ // |compostior_| to repaint the content.
+ void SendDamagedRects();
// Suppresses painting the content by disgarding damaged region and ignoring
// new paint requests.
@@ -277,7 +279,7 @@
// Union of damaged rects to be used when compositor is ready to
// paint the content.
- gfx::Rect damaged_rect_;
+ SkRegion damaged_region_;
float opacity_;