| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/compositor_output_surface.h" | 5 #include "content/renderer/gpu/compositor_output_surface.h" |
| 6 | 6 |
| 7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
| 8 #include "content/common/view_messages.h" | 8 #include "content/common/view_messages.h" |
| 9 #include "content/renderer/render_thread_impl.h" | 9 #include "content/renderer/render_thread_impl.h" |
| 10 #include "ipc/ipc_forwarding_message_filter.h" | 10 #include "ipc/ipc_forwarding_message_filter.h" |
| 11 #include "ipc/ipc_sync_channel.h" | 11 #include "ipc/ipc_sync_channel.h" |
| 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorOutput
SurfaceClient.h" | 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorOutput
SurfaceClient.h" |
| 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
| 14 | 14 |
| 15 using WebKit::WebGraphicsContext3D; | 15 using WebKit::WebGraphicsContext3D; |
| 16 using WebKit::WebCompositorSoftwareOutputDevice; | 16 using WebKit::WebCompositorSoftwareOutputDevice; |
| 17 | 17 |
| 18 namespace content { |
| 19 |
| 18 //------------------------------------------------------------------------------ | 20 //------------------------------------------------------------------------------ |
| 19 | 21 |
| 20 // static | 22 // static |
| 21 IPC::ForwardingMessageFilter* CompositorOutputSurface::CreateFilter( | 23 IPC::ForwardingMessageFilter* CompositorOutputSurface::CreateFilter( |
| 22 base::TaskRunner* target_task_runner) | 24 base::TaskRunner* target_task_runner) |
| 23 { | 25 { |
| 24 uint32 messages_to_filter[] = {ViewMsg_UpdateVSyncParameters::ID}; | 26 uint32 messages_to_filter[] = {ViewMsg_UpdateVSyncParameters::ID}; |
| 25 return new IPC::ForwardingMessageFilter( | 27 return new IPC::ForwardingMessageFilter( |
| 26 messages_to_filter, arraysize(messages_to_filter), | 28 messages_to_filter, arraysize(messages_to_filter), |
| 27 target_task_runner); | 29 target_task_runner); |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 base::TimeTicks timebase, | 107 base::TimeTicks timebase, |
| 106 base::TimeDelta interval) { | 108 base::TimeDelta interval) { |
| 107 DCHECK(CalledOnValidThread()); | 109 DCHECK(CalledOnValidThread()); |
| 108 DCHECK(client_); | 110 DCHECK(client_); |
| 109 double monotonicTimebase = timebase.ToInternalValue() / | 111 double monotonicTimebase = timebase.ToInternalValue() / |
| 110 static_cast<double>(base::Time::kMicrosecondsPerSecond); | 112 static_cast<double>(base::Time::kMicrosecondsPerSecond); |
| 111 double intervalInSeconds = interval.ToInternalValue() / | 113 double intervalInSeconds = interval.ToInternalValue() / |
| 112 static_cast<double>(base::Time::kMicrosecondsPerSecond); | 114 static_cast<double>(base::Time::kMicrosecondsPerSecond); |
| 113 client_->onVSyncParametersChanged(monotonicTimebase, intervalInSeconds); | 115 client_->onVSyncParametersChanged(monotonicTimebase, intervalInSeconds); |
| 114 } | 116 } |
| 117 |
| 118 } // namespace content |
| OLD | NEW |