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

Side by Side Diff: sky/viewer/platform/platform_impl.cc

Issue 691493004: Remove callOnMainThread (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « sky/viewer/platform/platform_impl.h ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/viewer/platform/platform_impl.h" 5 #include "sky/viewer/platform/platform_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/rand_util.h" 10 #include "base/rand_util.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 shared_timer_.Stop(); 108 shared_timer_.Stop();
109 shared_timer_.Start(FROM_HERE, base::TimeDelta::FromMicroseconds(interval), 109 shared_timer_.Start(FROM_HERE, base::TimeDelta::FromMicroseconds(interval),
110 this, &PlatformImpl::DoTimeout); 110 this, &PlatformImpl::DoTimeout);
111 } 111 }
112 112
113 void PlatformImpl::stopSharedTimer() { 113 void PlatformImpl::stopSharedTimer() {
114 shared_timer_.Stop(); 114 shared_timer_.Stop();
115 } 115 }
116 116
117 void PlatformImpl::callOnMainThread(
118 void (*func)(void*), void* context) {
119 main_loop_->PostTask(FROM_HERE, base::Bind(func, context));
120 }
121
122 base::SingleThreadTaskRunner* PlatformImpl::mainThreadTaskRunner() { 117 base::SingleThreadTaskRunner* PlatformImpl::mainThreadTaskRunner() {
123 return main_thread_task_runner_.get(); 118 return main_thread_task_runner_.get();
124 } 119 }
125 120
126
127 bool PlatformImpl::isThreadedCompositingEnabled() { 121 bool PlatformImpl::isThreadedCompositingEnabled() {
128 return true; 122 return true;
129 } 123 }
130 124
131 blink::WebCompositorSupport* PlatformImpl::compositorSupport() { 125 blink::WebCompositorSupport* PlatformImpl::compositorSupport() {
132 return &compositor_support_; 126 return &compositor_support_;
133 } 127 }
134 128
135 blink::WebScrollbarBehavior* PlatformImpl::scrollbarBehavior() { 129 blink::WebScrollbarBehavior* PlatformImpl::scrollbarBehavior() {
136 return &scrollbar_behavior_; 130 return &scrollbar_behavior_;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 const unsigned char* category_group_enabled, 247 const unsigned char* category_group_enabled,
254 const char* name, 248 const char* name,
255 TraceEventHandle handle) { 249 TraceEventHandle handle) {
256 base::debug::TraceEventHandle traceEventHandle; 250 base::debug::TraceEventHandle traceEventHandle;
257 memcpy(&traceEventHandle, &handle, sizeof(handle)); 251 memcpy(&traceEventHandle, &handle, sizeof(handle));
258 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION( 252 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(
259 category_group_enabled, name, traceEventHandle); 253 category_group_enabled, name, traceEventHandle);
260 } 254 }
261 255
262 } // namespace sky 256 } // namespace sky
OLDNEW
« no previous file with comments | « sky/viewer/platform/platform_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698