OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "cc/surfaces/display.h" | 5 #include "cc/surfaces/display.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 scheduler_->DidSwapBuffers(); | 348 scheduler_->DidSwapBuffers(); |
349 } | 349 } |
350 | 350 |
351 void Display::DidSwapBuffersComplete() { | 351 void Display::DidSwapBuffersComplete() { |
352 if (scheduler_) | 352 if (scheduler_) |
353 scheduler_->DidSwapBuffersComplete(); | 353 scheduler_->DidSwapBuffersComplete(); |
354 if (renderer_) | 354 if (renderer_) |
355 renderer_->SwapBuffersComplete(); | 355 renderer_->SwapBuffersComplete(); |
356 } | 356 } |
357 | 357 |
| 358 void Display::DidReceiveTextureInUseResponses( |
| 359 const gpu::TextureInUseResponses& responses) { |
| 360 if (renderer_) |
| 361 renderer_->DidReceiveTextureInUseResponses(responses); |
| 362 } |
| 363 |
358 void Display::SetBeginFrameSource(BeginFrameSource* source) { | 364 void Display::SetBeginFrameSource(BeginFrameSource* source) { |
359 // It's expected that there's only a single source from the | 365 // It's expected that there's only a single source from the |
360 // BrowserCompositorOutputSurface that corresponds to vsync. The BFS is | 366 // BrowserCompositorOutputSurface that corresponds to vsync. The BFS is |
361 // passed BrowserCompositorOutputSurface -> Display -> DisplayScheduler as an | 367 // passed BrowserCompositorOutputSurface -> Display -> DisplayScheduler as an |
362 // input. DisplayScheduler makes a decision about which BFS to use and | 368 // input. DisplayScheduler makes a decision about which BFS to use and |
363 // calls back to Display as DisplaySchedulerClient to register for that | 369 // calls back to Display as DisplaySchedulerClient to register for that |
364 // surface id. | 370 // surface id. |
365 DCHECK(!vsync_begin_frame_source_); | 371 DCHECK(!vsync_begin_frame_source_); |
366 vsync_begin_frame_source_ = source; | 372 vsync_begin_frame_source_ = source; |
367 } | 373 } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 | 430 |
425 if (surface_id == current_surface_id_) | 431 if (surface_id == current_surface_id_) |
426 UpdateRootSurfaceResourcesLocked(); | 432 UpdateRootSurfaceResourcesLocked(); |
427 } | 433 } |
428 | 434 |
429 SurfaceId Display::CurrentSurfaceId() { | 435 SurfaceId Display::CurrentSurfaceId() { |
430 return current_surface_id_; | 436 return current_surface_id_; |
431 } | 437 } |
432 | 438 |
433 } // namespace cc | 439 } // namespace cc |
OLD | NEW |