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

Unified Diff: ui/compositor/layer.h

Issue 11415089: ui/compositor: use cc/ directly instead of webkit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac Created 8 years, 1 month 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
Index: ui/compositor/layer.h
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index bd6b13d158b0d8d4c05206ff9cb4eebeebee932f..20887fd7cfc5d3eb2f3059f9f2d2e75fc25513f0 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -12,12 +12,8 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayerClient.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureLayerClient.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayer.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebSolidColorLayer.h"
-#include "third_party/WebKit/Source/Platform/chromium/public/WebExternalTextureLayer.h"
+#include "cc/content_layer_client.h"
+#include "cc/texture_layer_client.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/compositor/compositor.h"
@@ -29,6 +25,14 @@
class SkCanvas;
+namespace cc {
+class ContentLayer;
+class Layer;
+class ResourceUpdateQueue;
+class SolidColorLayer;
+class TextureLayer;
+}
+
namespace ui {
class Compositor;
@@ -47,8 +51,8 @@ class Texture;
// NULL, but the children are not deleted.
class COMPOSITOR_EXPORT Layer
: public LayerAnimationDelegate,
- NON_EXPORTED_BASE(public WebKit::WebContentLayerClient),
- NON_EXPORTED_BASE(public WebKit::WebExternalTextureLayerClient) {
+ NON_EXPORTED_BASE(public cc::ContentLayerClient),
+ NON_EXPORTED_BASE(public cc::TextureLayerClient) {
public:
Layer();
explicit Layer(LayerType type);
@@ -266,19 +270,14 @@ class COMPOSITOR_EXPORT Layer
// (e.g. the GPU process on UI_COMPOSITOR_IMAGE_TRANSPORT).
bool layer_updated_externally() const { return layer_updated_externally_; }
- // WebContentLayerClient
- virtual void paintContents(WebKit::WebCanvas*,
- const WebKit::WebRect& clip,
-#if WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT
- bool can_paint_lcd_text,
-#endif // WEBCONTENTLAYERCLIENT_HAS_CANPAINTLCDTEXT
- WebKit::WebFloatRect& opaque) OVERRIDE;
+ // ContentLayerClient
+ virtual void paintContents(
+ SkCanvas*, const gfx::Rect& clip, gfx::RectF& opaque) OVERRIDE;
- WebKit::WebLayer* web_layer() { return web_layer_; }
+ cc::Layer* cc_layer() { return cc_layer_; }
- // WebExternalTextureLayerClient
- virtual unsigned prepareTexture(
- WebKit::WebTextureUpdater& /* updater */) OVERRIDE;
+ // TextureLayerClient
+ virtual unsigned prepareTexture(cc::ResourceUpdateQueue&) OVERRIDE;
virtual WebKit::WebGraphicsContext3D* context() OVERRIDE;
float device_scale_factor() const { return device_scale_factor_; }
@@ -408,11 +407,11 @@ class COMPOSITOR_EXPORT Layer
// Ownership of the layer is held through one of the strongly typed layer
// pointers, depending on which sort of layer this is.
- scoped_ptr<WebKit::WebContentLayer> content_layer_;
- scoped_ptr<WebKit::WebExternalTextureLayer> texture_layer_;
- scoped_ptr<WebKit::WebSolidColorLayer> solid_color_layer_;
- WebKit::WebLayer* web_layer_;
- bool web_layer_is_accelerated_;
+ scoped_refptr<cc::ContentLayer> content_layer_;
+ scoped_refptr<cc::TextureLayer> texture_layer_;
+ scoped_refptr<cc::SolidColorLayer> solid_color_layer_;
+ cc::Layer* cc_layer_;
+ bool cc_layer_is_accelerated_;
// If true, the layer scales the canvas and the texture with the device scale
// factor as appropriate. When true, the texture size is in DIP.
« cc/proxy.h ('K') | « ui/compositor/compositor.gyp ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698