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 "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "cc/input/input_handler.h" | 10 #include "cc/input/input_handler.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 g_factory.Get().GetOffscreenContextProviderForCompositorThread()); | 246 g_factory.Get().GetOffscreenContextProviderForCompositorThread()); |
247 } | 247 } |
248 | 248 |
249 void SynchronousCompositorImpl::ReleaseHwDraw() { | 249 void SynchronousCompositorImpl::ReleaseHwDraw() { |
250 DCHECK(CalledOnValidThread()); | 250 DCHECK(CalledOnValidThread()); |
251 DCHECK(output_surface_); | 251 DCHECK(output_surface_); |
252 return output_surface_->ReleaseHwDraw(); | 252 return output_surface_->ReleaseHwDraw(); |
253 } | 253 } |
254 | 254 |
255 bool SynchronousCompositorImpl::DemandDrawHw( | 255 bool SynchronousCompositorImpl::DemandDrawHw( |
256 gfx::Size view_size, | 256 gfx::Size surface_size, |
257 const gfx::Transform& transform, | 257 const gfx::Transform& transform, |
258 gfx::Rect damage_area, | 258 gfx::Rect viewport, |
| 259 gfx::Rect clip, |
259 bool stencil_enabled) { | 260 bool stencil_enabled) { |
260 DCHECK(CalledOnValidThread()); | 261 DCHECK(CalledOnValidThread()); |
261 DCHECK(output_surface_); | 262 DCHECK(output_surface_); |
262 | 263 |
263 return output_surface_->DemandDrawHw( | 264 return output_surface_->DemandDrawHw( |
264 view_size, transform, damage_area, stencil_enabled); | 265 surface_size, transform, viewport, clip, stencil_enabled); |
265 } | 266 } |
266 | 267 |
267 bool SynchronousCompositorImpl::DemandDrawSw(SkCanvas* canvas) { | 268 bool SynchronousCompositorImpl::DemandDrawSw(SkCanvas* canvas) { |
268 DCHECK(CalledOnValidThread()); | 269 DCHECK(CalledOnValidThread()); |
269 DCHECK(output_surface_); | 270 DCHECK(output_surface_); |
270 | 271 |
271 return output_surface_->DemandDrawSw(canvas); | 272 return output_surface_->DemandDrawSw(canvas); |
272 } | 273 } |
273 | 274 |
274 void SynchronousCompositorImpl::DidChangeRootLayerScrollOffset() { | 275 void SynchronousCompositorImpl::DidChangeRootLayerScrollOffset() { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 g_factory.Get(); // Ensure it's initialized. | 375 g_factory.Get(); // Ensure it's initialized. |
375 SynchronousCompositorImpl::CreateForWebContents(contents); | 376 SynchronousCompositorImpl::CreateForWebContents(contents); |
376 } | 377 } |
377 if (SynchronousCompositorImpl* instance = | 378 if (SynchronousCompositorImpl* instance = |
378 SynchronousCompositorImpl::FromWebContents(contents)) { | 379 SynchronousCompositorImpl::FromWebContents(contents)) { |
379 instance->SetClient(client); | 380 instance->SetClient(client); |
380 } | 381 } |
381 } | 382 } |
382 | 383 |
383 } // namespace content | 384 } // namespace content |
OLD | NEW |