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

Unified Diff: ui/gfx/compositor/layer.h

Issue 9289036: aura: Add Layer::LAYER_SOLID_COLOR to compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update WorkspaceManagerTest Created 8 years, 11 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 | « ui/aura/window_unittest.cc ('k') | ui/gfx/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/compositor/layer.h
diff --git a/ui/gfx/compositor/layer.h b/ui/gfx/compositor/layer.h
index b1477cbbf456e10efc33f57ef6b02d4177620193..ab6599e85ece19e96be7f0ed756612b084c4162a 100644
--- a/ui/gfx/compositor/layer.h
+++ b/ui/gfx/compositor/layer.h
@@ -13,6 +13,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
+#include "third_party/skia/include/core/SkColor.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"
@@ -42,8 +43,15 @@ class COMPOSITOR_EXPORT Layer :
NON_EXPORTED_BASE(public WebKit::WebContentLayerClient) {
public:
enum LayerType {
- LAYER_HAS_NO_TEXTURE = 0,
- LAYER_HAS_TEXTURE = 1
+ // A layer that has no onscreen representation (note that its children will
+ // still be drawn, though).
+ LAYER_NOT_DRAWN = 0,
+
+ // A layer that has a texture.
+ LAYER_TEXTURED = 1,
+
+ // A layer that's drawn as a single color.
+ LAYER_SOLID_COLOR = 2,
};
Layer();
@@ -163,9 +171,12 @@ class COMPOSITOR_EXPORT Layer :
// single-compositor world.
void SetExternalTexture(ui::Texture* texture);
- // Resets the canvas of the texture.
+ // Resets the canvas of the texture. May only be called for LAYER_TEXTURED.
void SetCanvas(const SkCanvas& canvas, const gfx::Point& origin);
+ // Sets the layer's fill color. May only be called for LAYER_SOLID_COLOR.
+ void SetColor(SkColor color);
+
// Adds |invalid_rect| to the Layer's pending invalid rect and calls
// ScheduleDraw().
void SchedulePaint(const gfx::Rect& invalid_rect);
« no previous file with comments | « ui/aura/window_unittest.cc ('k') | ui/gfx/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698