| 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 25 matching lines...) Expand all Loading... |
| 36 #include "content/public/common/content_switches.h" | 36 #include "content/public/common/content_switches.h" |
| 37 #include "content/renderer/input/input_handler_manager.h" | 37 #include "content/renderer/input/input_handler_manager.h" |
| 38 #include "gpu/command_buffer/client/gles2_interface.h" | 38 #include "gpu/command_buffer/client/gles2_interface.h" |
| 39 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac
k.h" | 39 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac
k.h" |
| 40 #include "third_party/WebKit/public/platform/WebLayoutAndPaintAsyncCallback.h" | 40 #include "third_party/WebKit/public/platform/WebLayoutAndPaintAsyncCallback.h" |
| 41 #include "third_party/WebKit/public/platform/WebSize.h" | 41 #include "third_party/WebKit/public/platform/WebSize.h" |
| 42 #include "third_party/WebKit/public/web/WebKit.h" | 42 #include "third_party/WebKit/public/web/WebKit.h" |
| 43 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" | 43 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
| 44 #include "third_party/WebKit/public/web/WebSelection.h" | 44 #include "third_party/WebKit/public/web/WebSelection.h" |
| 45 #include "third_party/WebKit/public/web/WebWidget.h" | 45 #include "third_party/WebKit/public/web/WebWidget.h" |
| 46 #include "ui/gfx/frame_time.h" | 46 |
| 47 #include "ui/gl/gl_switches.h" | 47 #include "ui/gl/gl_switches.h" |
| 48 #include "ui/native_theme/native_theme_switches.h" | 48 #include "ui/native_theme/native_theme_switches.h" |
| 49 | 49 |
| 50 #if defined(OS_ANDROID) | 50 #if defined(OS_ANDROID) |
| 51 #include "content/renderer/android/synchronous_compositor_factory.h" | 51 #include "content/renderer/android/synchronous_compositor_factory.h" |
| 52 #include "ui/gfx/android/device_display_info.h" | 52 #include "ui/gfx/android/device_display_info.h" |
| 53 #endif | 53 #endif |
| 54 | 54 |
| 55 namespace base { | 55 namespace base { |
| 56 class Value; | 56 class Value; |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 base::MessageLoop::current()->PostTask( | 742 base::MessageLoop::current()->PostTask( |
| 743 FROM_HERE, base::Bind(&RenderWidgetCompositor::SynchronousCommit, | 743 FROM_HERE, base::Bind(&RenderWidgetCompositor::SynchronousCommit, |
| 744 weak_factory_.GetWeakPtr())); | 744 weak_factory_.GetWeakPtr())); |
| 745 } else { | 745 } else { |
| 746 layer_tree_host_->SetNeedsCommit(); | 746 layer_tree_host_->SetNeedsCommit(); |
| 747 } | 747 } |
| 748 } | 748 } |
| 749 | 749 |
| 750 void RenderWidgetCompositor::SynchronousCommit() { | 750 void RenderWidgetCompositor::SynchronousCommit() { |
| 751 DCHECK(CommitIsSynchronous()); | 751 DCHECK(CommitIsSynchronous()); |
| 752 layer_tree_host_->Composite(gfx::FrameTime::Now()); | 752 layer_tree_host_->Composite(base::TimeTicks::Now()); |
| 753 } | 753 } |
| 754 | 754 |
| 755 void RenderWidgetCompositor::finishAllRendering() { | 755 void RenderWidgetCompositor::finishAllRendering() { |
| 756 layer_tree_host_->FinishAllRendering(); | 756 layer_tree_host_->FinishAllRendering(); |
| 757 } | 757 } |
| 758 | 758 |
| 759 void RenderWidgetCompositor::setDeferCommits(bool defer_commits) { | 759 void RenderWidgetCompositor::setDeferCommits(bool defer_commits) { |
| 760 layer_tree_host_->SetDeferCommits(defer_commits); | 760 layer_tree_host_->SetDeferCommits(defer_commits); |
| 761 } | 761 } |
| 762 | 762 |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 return; | 964 return; |
| 965 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); | 965 provider->ContextGL()->RateLimitOffscreenContextCHROMIUM(); |
| 966 } | 966 } |
| 967 | 967 |
| 968 void RenderWidgetCompositor::SetSurfaceIdNamespace( | 968 void RenderWidgetCompositor::SetSurfaceIdNamespace( |
| 969 uint32_t surface_id_namespace) { | 969 uint32_t surface_id_namespace) { |
| 970 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); | 970 layer_tree_host_->set_surface_id_namespace(surface_id_namespace); |
| 971 } | 971 } |
| 972 | 972 |
| 973 } // namespace content | 973 } // namespace content |
| OLD | NEW |