| 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 "cc/output/output_surface.h" | 9 #include "cc/output/output_surface.h" |
| 10 #include "cc/surfaces/surface_factory.h" | 10 #include "cc/surfaces/surface_factory.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 display_client_ = display_client; | 36 display_client_ = display_client; |
| 37 } | 37 } |
| 38 SurfaceFactory* factory() { return &factory_; } | 38 SurfaceFactory* factory() { return &factory_; } |
| 39 void ReceivedVSyncParameters(base::TimeTicks timebase, | 39 void ReceivedVSyncParameters(base::TimeTicks timebase, |
| 40 base::TimeDelta interval); | 40 base::TimeDelta interval); |
| 41 | 41 |
| 42 // OutputSurface implementation. | 42 // OutputSurface implementation. |
| 43 void SwapBuffers(CompositorFrame* frame) override; | 43 void SwapBuffers(CompositorFrame* frame) override; |
| 44 bool BindToClient(OutputSurfaceClient* client) override; | 44 bool BindToClient(OutputSurfaceClient* client) override; |
| 45 void ForceReclaimResources() override; | 45 void ForceReclaimResources() override; |
| 46 void DetachFromClient() override; |
| 46 | 47 |
| 47 // SurfaceFactoryClient implementation. | 48 // SurfaceFactoryClient implementation. |
| 48 void ReturnResources(const ReturnedResourceArray& resources) override; | 49 void ReturnResources(const ReturnedResourceArray& resources) override; |
| 49 void SetBeginFrameSource(SurfaceId surface_id, | 50 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override; |
| 50 BeginFrameSource* begin_frame_source) override; | |
| 51 | 51 |
| 52 private: | 52 private: |
| 53 void SwapBuffersComplete(SurfaceDrawStatus drawn); | 53 void SwapBuffersComplete(SurfaceDrawStatus drawn); |
| 54 | 54 |
| 55 OnscreenDisplayClient* display_client_; | 55 OnscreenDisplayClient* display_client_; |
| 56 SurfaceFactory factory_; | 56 SurfaceFactory factory_; |
| 57 gfx::Size display_size_; | 57 gfx::Size display_size_; |
| 58 SurfaceId surface_id_; | 58 SurfaceId surface_id_; |
| 59 SurfaceIdAllocator* allocator_; | 59 SurfaceIdAllocator* allocator_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(SurfaceDisplayOutputSurface); | 61 DISALLOW_COPY_AND_ASSIGN(SurfaceDisplayOutputSurface); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace cc | 64 } // namespace cc |
| 65 | 65 |
| 66 #endif // CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ | 66 #endif // CC_SURFACES_SURFACE_DISPLAY_OUTPUT_SURFACE_H_ |
| OLD | NEW |