| 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/renderer/android/synchronous_compositor_output_surface.h" | 5 #include "content/renderer/android/synchronous_compositor_output_surface.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 fallback_tick_.Reset( | 193 fallback_tick_.Reset( |
| 194 base::Bind(&SynchronousCompositorOutputSurface::FallbackTickFired, | 194 base::Bind(&SynchronousCompositorOutputSurface::FallbackTickFired, |
| 195 base::Unretained(this))); | 195 base::Unretained(this))); |
| 196 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 196 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
| 197 FROM_HERE, fallback_tick_.callback(), | 197 FROM_HERE, fallback_tick_.callback(), |
| 198 base::TimeDelta::FromMilliseconds(kFallbackTickTimeoutInMilliseconds)); | 198 base::TimeDelta::FromMilliseconds(kFallbackTickTimeoutInMilliseconds)); |
| 199 fallback_tick_pending_ = true; | 199 fallback_tick_pending_ = true; |
| 200 } | 200 } |
| 201 } | 201 } |
| 202 | 202 |
| 203 void SynchronousCompositorOutputSurface::BindFramebuffer() { |
| 204 // This is a delegating output surface, no framebuffer/direct drawing support. |
| 205 NOTREACHED(); |
| 206 } |
| 207 |
| 208 uint32_t SynchronousCompositorOutputSurface::GetFramebufferCopyTextureFormat() { |
| 209 // This is a delegating output surface, no framebuffer/direct drawing support. |
| 210 NOTREACHED(); |
| 211 return 0; |
| 212 } |
| 213 |
| 203 void SynchronousCompositorOutputSurface::DemandDrawHw( | 214 void SynchronousCompositorOutputSurface::DemandDrawHw( |
| 204 const gfx::Size& surface_size, | 215 const gfx::Size& surface_size, |
| 205 const gfx::Transform& transform, | 216 const gfx::Transform& transform, |
| 206 const gfx::Rect& viewport, | 217 const gfx::Rect& viewport, |
| 207 const gfx::Rect& clip, | 218 const gfx::Rect& clip, |
| 208 const gfx::Rect& viewport_rect_for_tile_priority, | 219 const gfx::Rect& viewport_rect_for_tile_priority, |
| 209 const gfx::Transform& transform_for_tile_priority) { | 220 const gfx::Transform& transform_for_tile_priority) { |
| 210 DCHECK(CalledOnValidThread()); | 221 DCHECK(CalledOnValidThread()); |
| 211 DCHECK(HasClient()); | 222 DCHECK(HasClient()); |
| 212 DCHECK(context_provider_.get()); | 223 DCHECK(context_provider_.get()); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 bool SynchronousCompositorOutputSurface::Send(IPC::Message* message) { | 317 bool SynchronousCompositorOutputSurface::Send(IPC::Message* message) { |
| 307 DCHECK(CalledOnValidThread()); | 318 DCHECK(CalledOnValidThread()); |
| 308 return sender_->Send(message); | 319 return sender_->Send(message); |
| 309 } | 320 } |
| 310 | 321 |
| 311 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { | 322 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { |
| 312 return thread_checker_.CalledOnValidThread(); | 323 return thread_checker_.CalledOnValidThread(); |
| 313 } | 324 } |
| 314 | 325 |
| 315 } // namespace content | 326 } // namespace content |
| OLD | NEW |