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

Unified Diff: examples/sky_compositor_app/sky_compositor_app.cc

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
« no previous file with comments | « no previous file | sky/compositor/BUILD.gn » ('j') | sky/viewer/document_view.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/sky_compositor_app/sky_compositor_app.cc
diff --git a/examples/sky_compositor_app/sky_compositor_app.cc b/examples/sky_compositor_app/sky_compositor_app.cc
index 725ad07ff9d10aa7f6670bc0e3d19dc515157759..6ad298e368e574845ea1b7fe66fd06a14e196e8b 100644
--- a/examples/sky_compositor_app/sky_compositor_app.cc
+++ b/examples/sky_compositor_app/sky_compositor_app.cc
@@ -12,9 +12,9 @@
#include "mojo/services/view_manager/public/cpp/view_manager.h"
#include "mojo/services/view_manager/public/cpp/view_manager_client_factory.h"
#include "mojo/services/view_manager/public/cpp/view_manager_delegate.h"
-#include "sky/compositor/display_delegate_ganesh.h"
#include "sky/compositor/layer.h"
#include "sky/compositor/layer_host.h"
+#include "sky/compositor/rasterizer_ganesh.h"
#include "third_party/skia/include/core/SkCanvas.h"
namespace examples {
@@ -41,9 +41,6 @@ class SkyCompositorApp : public mojo::ApplicationDelegate,
shell_ = app->shell();
view_manager_client_factory_.reset(
new mojo::ViewManagerClientFactory(app->shell(), this));
-
- sky::DisplayDelegate::setDisplayDelegateCreateFunction(
- sky::DisplayDelegateGanesh::create);
}
bool ConfigureIncomingConnection(
@@ -60,6 +57,8 @@ class SkyCompositorApp : public mojo::ApplicationDelegate,
layer_host_.reset(new sky::LayerHost(this));
root_layer_ = make_scoped_refptr(new sky::Layer(this));
+ root_layer_->set_rasterizer(
+ make_scoped_ptr(new sky::RasterizerGanesh(layer_host_.get())));
layer_host_->SetRootLayer(root_layer_);
layer_host_->SetNeedsAnimate();
}
« no previous file with comments | « no previous file | sky/compositor/BUILD.gn » ('j') | sky/viewer/document_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698