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

Side by Side Diff: sky/shell/ui/engine.cc

Issue 1157033006: DO NOT COMMIT - fn port to RenderNode, work in progress, does not work (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fix adam's review comments Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « sky/sdk/lib/framework/node.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/shell/ui/engine.h" 5 #include "sky/shell/ui/engine.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "mojo/public/cpp/application/connect.h" 9 #include "mojo/public/cpp/application/connect.h"
10 #include "sky/engine/public/platform/WebInputEvent.h" 10 #include "sky/engine/public/platform/WebInputEvent.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 mojo::NetworkServicePtr network_service; 60 mojo::NetworkServicePtr network_service;
61 mojo::ConnectToService(service_provider_.get(), &network_service); 61 mojo::ConnectToService(service_provider_.get(), &network_service);
62 platform_impl_.reset(new PlatformImpl(network_service.Pass())); 62 platform_impl_.reset(new PlatformImpl(network_service.Pass()));
63 63
64 blink::initialize(platform_impl_.get()); 64 blink::initialize(platform_impl_.get());
65 } 65 }
66 66
67 void Engine::BeginFrame(base::TimeTicks frame_time) { 67 void Engine::BeginFrame(base::TimeTicks frame_time) {
68 TRACE_EVENT0("sky", "Engine::BeginFrame"); 68 TRACE_EVENT0("sky", "Engine::BeginFrame");
69 69
70 double frame_time_sec = (frame_time - base::TimeTicks()).InSecondsF();
71 double deadline_sec = frame_time_sec;
72 double interval_sec = 1.0 / 60;
73 blink::WebBeginFrameArgs args(frame_time_sec, deadline_sec, interval_sec);
74
75 if (sky_view_) 70 if (sky_view_)
76 sky_view_->BeginFrame(frame_time); 71 sky_view_->BeginFrame(frame_time);
77 72
78 if (web_view_) { 73 if (web_view_) {
74 double frame_time_sec = (frame_time - base::TimeTicks()).InSecondsF();
75 double deadline_sec = frame_time_sec;
76 double interval_sec = 1.0 / 60;
77 blink::WebBeginFrameArgs args(frame_time_sec, deadline_sec, interval_sec);
79 web_view_->beginFrame(args); 78 web_view_->beginFrame(args);
80 web_view_->layout(); 79 web_view_->layout();
81 } 80 }
82 } 81 }
83 82
84 skia::RefPtr<SkPicture> Engine::Paint() { 83 skia::RefPtr<SkPicture> Engine::Paint() {
85 TRACE_EVENT0("sky", "Engine::Paint"); 84 TRACE_EVENT0("sky", "Engine::Paint");
86 85
87 SkRTreeFactory factory; 86 SkRTreeFactory factory;
88 SkPictureRecorder recorder; 87 SkPictureRecorder recorder;
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 233
235 void Engine::DidNavigateLocally(const mojo::String& url) { 234 void Engine::DidNavigateLocally(const mojo::String& url) {
236 } 235 }
237 236
238 void Engine::RequestNavigateHistory(int32_t delta) { 237 void Engine::RequestNavigateHistory(int32_t delta) {
239 NOTIMPLEMENTED(); 238 NOTIMPLEMENTED();
240 } 239 }
241 240
242 } // namespace shell 241 } // namespace shell
243 } // namespace sky 242 } // namespace sky
OLDNEW
« no previous file with comments | « sky/sdk/lib/framework/node.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698