OLD | NEW |
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 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 return scoped_ptr<cc::SwapPromiseMonitor>( | 521 return scoped_ptr<cc::SwapPromiseMonitor>( |
522 new cc::LatencyInfoSwapPromiseMonitor( | 522 new cc::LatencyInfoSwapPromiseMonitor( |
523 latency, layer_tree_host_.get(), NULL)); | 523 latency, layer_tree_host_.get(), NULL)); |
524 } | 524 } |
525 | 525 |
526 void RenderWidgetCompositor::QueueSwapPromise( | 526 void RenderWidgetCompositor::QueueSwapPromise( |
527 scoped_ptr<cc::SwapPromise> swap_promise) { | 527 scoped_ptr<cc::SwapPromise> swap_promise) { |
528 layer_tree_host_->QueueSwapPromise(swap_promise.Pass()); | 528 layer_tree_host_->QueueSwapPromise(swap_promise.Pass()); |
529 } | 529 } |
530 | 530 |
531 int RenderWidgetCompositor::GetLayerTreeId() const { | |
532 return layer_tree_host_->id(); | |
533 } | |
534 | |
535 int RenderWidgetCompositor::GetSourceFrameNumber() const { | 531 int RenderWidgetCompositor::GetSourceFrameNumber() const { |
536 return layer_tree_host_->source_frame_number(); | 532 return layer_tree_host_->source_frame_number(); |
537 } | 533 } |
538 | 534 |
539 void RenderWidgetCompositor::SetNeedsUpdateLayers() { | 535 void RenderWidgetCompositor::SetNeedsUpdateLayers() { |
540 layer_tree_host_->SetNeedsUpdateLayers(); | 536 layer_tree_host_->SetNeedsUpdateLayers(); |
541 } | 537 } |
542 | 538 |
543 void RenderWidgetCompositor::SetNeedsCommit() { | 539 void RenderWidgetCompositor::SetNeedsCommit() { |
544 layer_tree_host_->SetNeedsCommit(); | 540 layer_tree_host_->SetNeedsCommit(); |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 cc::ContextProvider* provider = | 932 cc::ContextProvider* provider = |
937 compositor_deps_->GetSharedMainThreadContextProvider(); | 933 compositor_deps_->GetSharedMainThreadContextProvider(); |
938 // provider can be NULL after the GPU process crashed enough times and we | 934 // provider can be NULL after the GPU process crashed enough times and we |
939 // don't want to restart it any more (falling back to software). | 935 // don't want to restart it any more (falling back to software). |
940 if (!provider) | 936 if (!provider) |
941 return; | 937 return; |
942 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 938 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
943 } | 939 } |
944 | 940 |
945 } // namespace content | 941 } // namespace content |
OLD | NEW |