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

Unified Diff: sky/shell/ui/engine.cc

Issue 1134913003: Teach SkyView path to draw a circle (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 | « sky/shell/ui/engine.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/ui/engine.cc
diff --git a/sky/shell/ui/engine.cc b/sky/shell/ui/engine.cc
index 058682ded13fb10e7eb1d6ff9f8eafaa588c9262..e11463880d435eceb5ef099a30677dc6e7f9c19a 100644
--- a/sky/shell/ui/engine.cc
+++ b/sky/shell/ui/engine.cc
@@ -85,6 +85,13 @@ skia::RefPtr<SkPicture> Engine::Paint() {
physical_size_.width(), physical_size_.height(), &factory,
SkPictureRecorder::kComputeSaveLayerInfo_RecordFlag));
+ if (sky_view_) {
+ skia::RefPtr<SkPicture> picture = sky_view_->Paint();
+ canvas->clear(SK_ColorBLACK);
+ if (picture)
+ canvas->drawPicture(picture.get());
+ }
+
if (web_view_)
web_view_->paint(canvas.get(), blink::WebRect(gfx::Rect(physical_size_)));
@@ -149,7 +156,7 @@ void Engine::OnInputEvent(InputEventPtr event) {
void Engine::LoadURL(const mojo::String& url) {
// Enable SkyView here.
if (false) {
- sky_view_ = blink::SkyView::Create();
+ sky_view_ = blink::SkyView::Create(this);
sky_view_->Load(GURL(url));
return;
}
@@ -182,6 +189,10 @@ void Engine::didCreateIsolate(blink::WebLocalFrame* frame,
CreateServiceProvider(config_.service_provider_context));
}
+void Engine::SchedulePaint() {
+ animator_->RequestFrame();
+}
+
blink::ServiceProvider* Engine::services() {
return this;
}
« no previous file with comments | « sky/shell/ui/engine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698