| 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/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "cc/input/input_handler.h" | 9 #include "cc/input/input_handler.h" |
| 10 #include "content/browser/android/in_process/synchronous_compositor_factory_impl
.h" | 10 #include "content/browser/android/in_process/synchronous_compositor_factory_impl
.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 return success; | 108 return success; |
| 109 } | 109 } |
| 110 | 110 |
| 111 void SynchronousCompositorImpl::ReleaseHwDraw() { | 111 void SynchronousCompositorImpl::ReleaseHwDraw() { |
| 112 DCHECK(CalledOnValidThread()); | 112 DCHECK(CalledOnValidThread()); |
| 113 DCHECK(output_surface_); | 113 DCHECK(output_surface_); |
| 114 output_surface_->ReleaseHwDraw(); | 114 output_surface_->ReleaseHwDraw(); |
| 115 g_factory.Get().CompositorReleasedHardwareDraw(); | 115 g_factory.Get().CompositorReleasedHardwareDraw(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 gpu::GLInProcessContext* SynchronousCompositorImpl::GetShareContext() { | |
| 119 DCHECK(CalledOnValidThread()); | |
| 120 return g_factory.Get().GetShareContext(); | |
| 121 } | |
| 122 | |
| 123 scoped_ptr<cc::CompositorFrame> SynchronousCompositorImpl::DemandDrawHw( | 118 scoped_ptr<cc::CompositorFrame> SynchronousCompositorImpl::DemandDrawHw( |
| 124 gfx::Size surface_size, | 119 gfx::Size surface_size, |
| 125 const gfx::Transform& transform, | 120 const gfx::Transform& transform, |
| 126 gfx::Rect viewport, | 121 gfx::Rect viewport, |
| 127 gfx::Rect clip, | 122 gfx::Rect clip, |
| 128 gfx::Rect viewport_rect_for_tile_priority, | 123 gfx::Rect viewport_rect_for_tile_priority, |
| 129 const gfx::Transform& transform_for_tile_priority) { | 124 const gfx::Transform& transform_for_tile_priority) { |
| 130 DCHECK(CalledOnValidThread()); | 125 DCHECK(CalledOnValidThread()); |
| 131 DCHECK(output_surface_); | 126 DCHECK(output_surface_); |
| 132 | 127 |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 g_factory.Get(); // Ensure it's initialized. | 304 g_factory.Get(); // Ensure it's initialized. |
| 310 SynchronousCompositorImpl::CreateForWebContents(contents); | 305 SynchronousCompositorImpl::CreateForWebContents(contents); |
| 311 } | 306 } |
| 312 if (SynchronousCompositorImpl* instance = | 307 if (SynchronousCompositorImpl* instance = |
| 313 SynchronousCompositorImpl::FromWebContents(contents)) { | 308 SynchronousCompositorImpl::FromWebContents(contents)) { |
| 314 instance->SetClient(client); | 309 instance->SetClient(client); |
| 315 } | 310 } |
| 316 } | 311 } |
| 317 | 312 |
| 318 } // namespace content | 313 } // namespace content |
| OLD | NEW |