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

Unified Diff: sky/compositor/layer.h

Issue 854303002: Sky should use an SkPicture when drawing (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fixes Created 5 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
Index: sky/compositor/layer.h
diff --git a/sky/compositor/layer.h b/sky/compositor/layer.h
index 0f478bb9d121fabf2a41b634ac07037bf1e9972a..761d2bdbf8c1c164976cfde50a79dbbb22c0566f 100644
--- a/sky/compositor/layer.h
+++ b/sky/compositor/layer.h
@@ -7,12 +7,14 @@
#include "base/memory/ref_counted.h"
#include "mojo/gpu/gl_texture.h"
+#include "skia/ext/refptr.h"
#include "sky/compositor/layer_client.h"
+#include "sky/compositor/rasterizer.h"
+#include "third_party/skia/include/core/SkPicture.h"
#include "ui/gfx/geometry/rect.h"
namespace sky {
-class DisplayDelegate;
class LayerHost;
class Layer : public base::RefCounted<Layer> {
@@ -20,24 +22,26 @@ class Layer : public base::RefCounted<Layer> {
explicit Layer(LayerClient* client);
void SetSize(const gfx::Size& size);
- void GetPixelsForTesting(std::vector<unsigned char>* pixels);
void Display();
scoped_ptr<mojo::GLTexture> GetTexture();
const gfx::Size& size() const { return size_; }
- void set_host(LayerHost* host) { host_ = host; }
+ void set_rasterizer(scoped_ptr<Rasterizer> rasterizer) {
+ rasterizer_ = rasterizer.Pass();
+ }
private:
friend class base::RefCounted<Layer>;
~Layer();
+ skia::RefPtr<SkPicture> RecordPicture();
+
LayerClient* client_;
- LayerHost* host_;
gfx::Size size_;
scoped_ptr<mojo::GLTexture> texture_;
- scoped_ptr<DisplayDelegate> delegate_;
+ scoped_ptr<Rasterizer> rasterizer_;
DISALLOW_COPY_AND_ASSIGN(Layer);
};

Powered by Google App Engine
This is Rietveld 408576698