| 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 "webkit/compositor_bindings/web_compositor_support_impl.h" | 5 #include "webkit/compositor_bindings/web_compositor_support_impl.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
| 9 #include "cc/output_surface.h" | 9 #include "cc/output_surface.h" |
| 10 #include "cc/thread_impl.h" | 10 #include "cc/thread_impl.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 WebCompositorSupportImpl::WebCompositorSupportImpl() : initialized_(false) {} | 53 WebCompositorSupportImpl::WebCompositorSupportImpl() : initialized_(false) {} |
| 54 | 54 |
| 55 WebCompositorSupportImpl::~WebCompositorSupportImpl() {} | 55 WebCompositorSupportImpl::~WebCompositorSupportImpl() {} |
| 56 | 56 |
| 57 void WebCompositorSupportImpl::initialize( | 57 void WebCompositorSupportImpl::initialize( |
| 58 WebKit::WebThread* compositor_thread) { | 58 WebKit::WebThread* compositor_thread) { |
| 59 DCHECK(!initialized_); | 59 DCHECK(!initialized_); |
| 60 initialized_ = true; | 60 initialized_ = true; |
| 61 if (compositor_thread) { | 61 if (compositor_thread) { |
| 62 webkit_glue::WebThreadImpl* compositor_thread_impl = | 62 webkit_glue::WebThreadImplForMessageLoop* compositor_thread_impl = |
| 63 static_cast<webkit_glue::WebThreadImpl*>(compositor_thread); | 63 static_cast<webkit_glue::WebThreadImplForMessageLoop*>(compositor_thread
); |
| 64 compositor_thread_message_loop_proxy_ = | 64 compositor_thread_message_loop_proxy_ = |
| 65 compositor_thread_impl->message_loop()->message_loop_proxy(); | 65 compositor_thread_impl->message_loop_proxy(); |
| 66 } else { | 66 } else { |
| 67 compositor_thread_message_loop_proxy_ = NULL; | 67 compositor_thread_message_loop_proxy_ = NULL; |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 | 70 |
| 71 bool WebCompositorSupportImpl::isThreadingEnabled() { | 71 bool WebCompositorSupportImpl::isThreadingEnabled() { |
| 72 return compositor_thread_message_loop_proxy_; | 72 return compositor_thread_message_loop_proxy_; |
| 73 } | 73 } |
| 74 | 74 |
| 75 void WebCompositorSupportImpl::shutdown() { | 75 void WebCompositorSupportImpl::shutdown() { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 WebTransformAnimationCurve* | 145 WebTransformAnimationCurve* |
| 146 WebCompositorSupportImpl::createTransformAnimationCurve() { | 146 WebCompositorSupportImpl::createTransformAnimationCurve() { |
| 147 return new WebKit::WebTransformAnimationCurveImpl(); | 147 return new WebKit::WebTransformAnimationCurveImpl(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { | 150 WebTransformOperations* WebCompositorSupportImpl::createTransformOperations() { |
| 151 return new WebTransformOperationsImpl(); | 151 return new WebTransformOperationsImpl(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 } // namespace webkit | 154 } // namespace webkit |
| OLD | NEW |