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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 240163005: Deliver IPC messages together with SwapCompositorFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't use unknown to break the promise on deletion Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #if defined(OS_ANDROID) 10 #if defined(OS_ANDROID)
11 #include "base/android/sys_utils.h" 11 #include "base/android/sys_utils.h"
12 #endif 12 #endif
13 13
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
17 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
18 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "cc/base/latency_info_swap_promise.h" 20 #include "cc/base/latency_info_swap_promise.h"
21 #include "cc/base/latency_info_swap_promise_monitor.h" 21 #include "cc/base/latency_info_swap_promise_monitor.h"
22 #include "cc/base/swap_promise.h"
22 #include "cc/base/switches.h" 23 #include "cc/base/switches.h"
23 #include "cc/debug/layer_tree_debug_state.h" 24 #include "cc/debug/layer_tree_debug_state.h"
24 #include "cc/debug/micro_benchmark.h" 25 #include "cc/debug/micro_benchmark.h"
25 #include "cc/layers/layer.h" 26 #include "cc/layers/layer.h"
26 #include "cc/output/copy_output_request.h" 27 #include "cc/output/copy_output_request.h"
27 #include "cc/output/copy_output_result.h" 28 #include "cc/output/copy_output_result.h"
28 #include "cc/resources/single_release_callback.h" 29 #include "cc/resources/single_release_callback.h"
29 #include "cc/trees/layer_tree_host.h" 30 #include "cc/trees/layer_tree_host.h"
30 #include "content/child/child_shared_bitmap_manager.h" 31 #include "content/child/child_shared_bitmap_manager.h"
31 #include "content/common/content_switches_internal.h" 32 #include "content/common/content_switches_internal.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 399
399 void RenderWidgetCompositor::QueueSwapPromise( 400 void RenderWidgetCompositor::QueueSwapPromise(
400 scoped_ptr<cc::SwapPromise> swap_promise) { 401 scoped_ptr<cc::SwapPromise> swap_promise) {
401 layer_tree_host_->QueueSwapPromise(swap_promise.Pass()); 402 layer_tree_host_->QueueSwapPromise(swap_promise.Pass());
402 } 403 }
403 404
404 int RenderWidgetCompositor::GetLayerTreeId() const { 405 int RenderWidgetCompositor::GetLayerTreeId() const {
405 return layer_tree_host_->id(); 406 return layer_tree_host_->id();
406 } 407 }
407 408
409 int RenderWidgetCompositor::GetSourceFrameNumber() const {
410 return layer_tree_host_->source_frame_number();
411 }
412
408 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() { 413 void RenderWidgetCompositor::NotifyInputThrottledUntilCommit() {
409 layer_tree_host_->NotifyInputThrottledUntilCommit(); 414 layer_tree_host_->NotifyInputThrottledUntilCommit();
410 } 415 }
411 416
412 const cc::Layer* RenderWidgetCompositor::GetRootLayer() const { 417 const cc::Layer* RenderWidgetCompositor::GetRootLayer() const {
413 return layer_tree_host_->root_layer(); 418 return layer_tree_host_->root_layer();
414 } 419 }
415 420
416 int RenderWidgetCompositor::ScheduleMicroBenchmark( 421 int RenderWidgetCompositor::ScheduleMicroBenchmark(
417 const std::string& name, 422 const std::string& name,
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 cc::ContextProvider* provider = 713 cc::ContextProvider* provider =
709 RenderThreadImpl::current()->SharedMainThreadContextProvider().get(); 714 RenderThreadImpl::current()->SharedMainThreadContextProvider().get();
710 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); 715 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM();
711 } 716 }
712 717
713 bool RenderWidgetCompositor::usesGpuRasterization() { 718 bool RenderWidgetCompositor::usesGpuRasterization() {
714 return layer_tree_host_->UseGpuRasterization(); 719 return layer_tree_host_->UseGpuRasterization();
715 } 720 }
716 721
717 } // namespace content 722 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698