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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 117 |
118 gpu::GLInProcessContext* SynchronousCompositorImpl::GetShareContext() { | 118 gpu::GLInProcessContext* SynchronousCompositorImpl::GetShareContext() { |
119 DCHECK(CalledOnValidThread()); | 119 DCHECK(CalledOnValidThread()); |
120 return g_factory.Get().GetShareContext(); | 120 return g_factory.Get().GetShareContext(); |
121 } | 121 } |
122 | 122 |
123 scoped_ptr<cc::CompositorFrame> SynchronousCompositorImpl::DemandDrawHw( | 123 scoped_ptr<cc::CompositorFrame> SynchronousCompositorImpl::DemandDrawHw( |
124 gfx::Size surface_size, | 124 gfx::Size surface_size, |
125 const gfx::Transform& transform, | 125 const gfx::Transform& transform, |
126 gfx::Rect viewport, | 126 gfx::Rect viewport, |
127 gfx::Rect clip) { | 127 gfx::Rect clip, |
| 128 gfx::Rect viewport_rect_for_tile_priority, |
| 129 const gfx::Transform& transform_for_tile_priority) { |
128 DCHECK(CalledOnValidThread()); | 130 DCHECK(CalledOnValidThread()); |
129 DCHECK(output_surface_); | 131 DCHECK(output_surface_); |
130 | 132 |
131 scoped_ptr<cc::CompositorFrame> frame = | 133 scoped_ptr<cc::CompositorFrame> frame = |
132 output_surface_->DemandDrawHw(surface_size, transform, viewport, clip); | 134 output_surface_->DemandDrawHw(surface_size, |
| 135 transform, |
| 136 viewport, |
| 137 clip, |
| 138 viewport_rect_for_tile_priority, |
| 139 transform_for_tile_priority); |
133 if (frame.get()) | 140 if (frame.get()) |
134 UpdateFrameMetaData(frame->metadata); | 141 UpdateFrameMetaData(frame->metadata); |
135 | 142 |
136 return frame.Pass(); | 143 return frame.Pass(); |
137 } | 144 } |
138 | 145 |
139 void SynchronousCompositorImpl::ReturnResources( | 146 void SynchronousCompositorImpl::ReturnResources( |
140 const cc::CompositorFrameAck& frame_ack) { | 147 const cc::CompositorFrameAck& frame_ack) { |
141 DCHECK(CalledOnValidThread()); | 148 DCHECK(CalledOnValidThread()); |
142 output_surface_->ReturnResources(frame_ack); | 149 output_surface_->ReturnResources(frame_ack); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 g_factory.Get(); // Ensure it's initialized. | 309 g_factory.Get(); // Ensure it's initialized. |
303 SynchronousCompositorImpl::CreateForWebContents(contents); | 310 SynchronousCompositorImpl::CreateForWebContents(contents); |
304 } | 311 } |
305 if (SynchronousCompositorImpl* instance = | 312 if (SynchronousCompositorImpl* instance = |
306 SynchronousCompositorImpl::FromWebContents(contents)) { | 313 SynchronousCompositorImpl::FromWebContents(contents)) { |
307 instance->SetClient(client); | 314 instance->SetClient(client); |
308 } | 315 } |
309 } | 316 } |
310 | 317 |
311 } // namespace content | 318 } // namespace content |
OLD | NEW |