Chromium Code Reviews| 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 #ifndef CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ | 5 #ifndef CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ |
| 6 #define CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ | 6 #define CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/threading/thread_checker.h" | 9 #include "base/threading/thread_checker.h" |
| 10 #include "cc/output/output_surface.h" | 10 #include "cc/output/output_surface.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 void BindFramebuffer() override; | 48 void BindFramebuffer() override; |
| 49 uint32_t GetFramebufferCopyTextureFormat() override; | 49 uint32_t GetFramebufferCopyTextureFormat() override; |
| 50 | 50 |
| 51 // SurfaceFactoryClient implementation. | 51 // SurfaceFactoryClient implementation. |
| 52 void ReturnResources(const ReturnedResourceArray& resources) override; | 52 void ReturnResources(const ReturnedResourceArray& resources) override; |
| 53 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override; | 53 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override; |
| 54 | 54 |
| 55 // DisplayClient implementation. | 55 // DisplayClient implementation. |
| 56 void DisplayOutputSurfaceLost() override; | 56 void DisplayOutputSurfaceLost() override; |
| 57 void DisplaySetMemoryPolicy(const ManagedMemoryPolicy& policy) override; | 57 void DisplaySetMemoryPolicy(const ManagedMemoryPolicy& policy) override; |
| 58 void DisplayWillDrawAndSwap(bool will_draw_and_swap, | |
| 59 const RenderPassList& render_passes) override; | |
| 60 void DisplayDidDrawAndSwap() override; | |
|
enne (OOO)
2016/08/02 17:23:40
Also in a cut down in client functions sense, why
danakj
2016/08/02 17:28:39
We need to wait for swap for real to check on thin
| |
| 58 | 61 |
| 59 private: | 62 private: |
| 60 void SwapBuffersComplete(); | 63 void DidDrawCallback(); |
| 61 | 64 |
| 62 // This class is only meant to be used on a single thread. | 65 // This class is only meant to be used on a single thread. |
| 63 base::ThreadChecker thread_checker_; | 66 base::ThreadChecker thread_checker_; |
| 64 | 67 |
| 65 SurfaceManager* surface_manager_; | 68 SurfaceManager* surface_manager_; |
| 66 SurfaceIdAllocator* surface_id_allocator_; | 69 SurfaceIdAllocator* surface_id_allocator_; |
| 67 Display* display_; | 70 Display* display_; |
| 68 SurfaceFactory factory_; | 71 SurfaceFactory factory_; |
| 69 SurfaceId delegated_surface_id_; | 72 SurfaceId delegated_surface_id_; |
| 70 gfx::Size last_swap_frame_size_; | 73 gfx::Size last_swap_frame_size_; |
| 71 bool output_surface_lost_ = false; | 74 bool output_surface_lost_ = false; |
| 72 | 75 |
| 73 DISALLOW_COPY_AND_ASSIGN(SurfaceDisplayOutputSurface); | 76 DISALLOW_COPY_AND_ASSIGN(SurfaceDisplayOutputSurface); |
| 74 }; | 77 }; |
| 75 | 78 |
| 76 } // namespace cc | 79 } // namespace cc |
| 77 | 80 |
| 78 #endif // CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ | 81 #endif // CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ |
| OLD | NEW |