| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/browser/android/in_process/synchronous_compositor_impl.h" | 5 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 nullptr); | 167 nullptr); |
| 168 | 168 |
| 169 synchronous_input_handler_proxy_ = nullptr; | 169 synchronous_input_handler_proxy_ = nullptr; |
| 170 begin_frame_source_ = nullptr; | 170 begin_frame_source_ = nullptr; |
| 171 output_surface_ = nullptr; | 171 output_surface_ = nullptr; |
| 172 // Don't propogate this signal from one renderer to the next. | 172 // Don't propogate this signal from one renderer to the next. |
| 173 need_animate_input_ = false; | 173 need_animate_input_ = false; |
| 174 } | 174 } |
| 175 | 175 |
| 176 scoped_ptr<cc::CompositorFrame> SynchronousCompositorImpl::DemandDrawHw( | 176 scoped_ptr<cc::CompositorFrame> SynchronousCompositorImpl::DemandDrawHw( |
| 177 gfx::Size surface_size, | 177 const gfx::Size& surface_size, |
| 178 const gfx::Transform& transform, | 178 const gfx::Transform& transform, |
| 179 gfx::Rect viewport, | 179 const gfx::Rect& viewport, |
| 180 gfx::Rect clip, | 180 const gfx::Rect& clip, |
| 181 gfx::Rect viewport_rect_for_tile_priority, | 181 const gfx::Rect& viewport_rect_for_tile_priority, |
| 182 const gfx::Transform& transform_for_tile_priority) { | 182 const gfx::Transform& transform_for_tile_priority) { |
| 183 DCHECK(CalledOnValidThread()); | 183 DCHECK(CalledOnValidThread()); |
| 184 DCHECK(output_surface_); | 184 DCHECK(output_surface_); |
| 185 DCHECK(begin_frame_source_); | 185 DCHECK(begin_frame_source_); |
| 186 | 186 |
| 187 scoped_ptr<cc::CompositorFrame> frame = | 187 scoped_ptr<cc::CompositorFrame> frame = |
| 188 output_surface_->DemandDrawHw(surface_size, | 188 output_surface_->DemandDrawHw(surface_size, |
| 189 transform, | 189 transform, |
| 190 viewport, | 190 viewport, |
| 191 clip, | 191 clip, |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 DCHECK(contents); | 372 DCHECK(contents); |
| 373 DCHECK(client); | 373 DCHECK(client); |
| 374 g_factory.Get(); // Ensure it's initialized. | 374 g_factory.Get(); // Ensure it's initialized. |
| 375 WebContentsAndroid* web_contents_android = | 375 WebContentsAndroid* web_contents_android = |
| 376 static_cast<WebContentsImpl*>(contents)->GetWebContentsAndroid(); | 376 static_cast<WebContentsImpl*>(contents)->GetWebContentsAndroid(); |
| 377 DCHECK(!web_contents_android->synchronous_compositor_client()); | 377 DCHECK(!web_contents_android->synchronous_compositor_client()); |
| 378 web_contents_android->set_synchronous_compositor_client(client); | 378 web_contents_android->set_synchronous_compositor_client(client); |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace content | 381 } // namespace content |
| OLD | NEW |