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

Side by Side Diff: content/renderer/android/synchronous_compositor_output_surface.cc

Issue 2034663003: Remove use of deprecated MessageLoop methods in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/android/synchronous_compositor_output_surface.h" 5 #include "content/renderer/android/synchronous_compositor_output_surface.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h"
10 #include "base/logging.h" 11 #include "base/logging.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "base/single_thread_task_runner.h"
15 #include "base/threading/thread_task_runner_handle.h"
13 #include "cc/output/compositor_frame.h" 16 #include "cc/output/compositor_frame.h"
14 #include "cc/output/context_provider.h" 17 #include "cc/output/context_provider.h"
15 #include "cc/output/output_surface_client.h" 18 #include "cc/output/output_surface_client.h"
16 #include "cc/output/software_output_device.h" 19 #include "cc/output/software_output_device.h"
17 #include "content/common/android/sync_compositor_messages.h" 20 #include "content/common/android/sync_compositor_messages.h"
18 #include "content/renderer/android/synchronous_compositor_filter.h" 21 #include "content/renderer/android/synchronous_compositor_filter.h"
19 #include "content/renderer/android/synchronous_compositor_registry.h" 22 #include "content/renderer/android/synchronous_compositor_registry.h"
20 #include "content/renderer/gpu/frame_swap_message_queue.h" 23 #include "content/renderer/gpu/frame_swap_message_queue.h"
21 #include "content/renderer/render_thread_impl.h" 24 #include "content/renderer/render_thread_impl.h"
22 #include "gpu/command_buffer/client/context_support.h" 25 #include "gpu/command_buffer/client/context_support.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 185
183 void SynchronousCompositorOutputSurface::Invalidate() { 186 void SynchronousCompositorOutputSurface::Invalidate() {
184 DCHECK(CalledOnValidThread()); 187 DCHECK(CalledOnValidThread());
185 if (sync_client_) 188 if (sync_client_)
186 sync_client_->Invalidate(); 189 sync_client_->Invalidate();
187 190
188 if (!fallback_tick_pending_) { 191 if (!fallback_tick_pending_) {
189 fallback_tick_.Reset( 192 fallback_tick_.Reset(
190 base::Bind(&SynchronousCompositorOutputSurface::FallbackTickFired, 193 base::Bind(&SynchronousCompositorOutputSurface::FallbackTickFired,
191 base::Unretained(this))); 194 base::Unretained(this)));
192 base::MessageLoop::current()->PostDelayedTask( 195 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
193 FROM_HERE, fallback_tick_.callback(), 196 FROM_HERE, fallback_tick_.callback(),
194 base::TimeDelta::FromMilliseconds(kFallbackTickTimeoutInMilliseconds)); 197 base::TimeDelta::FromMilliseconds(kFallbackTickTimeoutInMilliseconds));
195 fallback_tick_pending_ = true; 198 fallback_tick_pending_ = true;
196 } 199 }
197 } 200 }
198 201
199 void SynchronousCompositorOutputSurface::DemandDrawHw( 202 void SynchronousCompositorOutputSurface::DemandDrawHw(
200 const gfx::Size& surface_size, 203 const gfx::Size& surface_size,
201 const gfx::Transform& transform, 204 const gfx::Transform& transform,
202 const gfx::Rect& viewport, 205 const gfx::Rect& viewport,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 bool SynchronousCompositorOutputSurface::Send(IPC::Message* message) { 305 bool SynchronousCompositorOutputSurface::Send(IPC::Message* message) {
303 DCHECK(CalledOnValidThread()); 306 DCHECK(CalledOnValidThread());
304 return sender_->Send(message); 307 return sender_->Send(message);
305 } 308 }
306 309
307 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 310 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
308 return thread_checker_.CalledOnValidThread(); 311 return thread_checker_.CalledOnValidThread();
309 } 312 }
310 313
311 } // namespace content 314 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_download_request_handler.cc ('k') | content/renderer/browser_plugin/browser_plugin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698