| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_OUTPUT_COMPOSITOR_FRAME_SINK_H_ | 5 #ifndef CC_OUTPUT_COMPOSITOR_FRAME_SINK_H_ |
| 6 #define CC_OUTPUT_COMPOSITOR_FRAME_SINK_H_ | 6 #define CC_OUTPUT_COMPOSITOR_FRAME_SINK_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // 2. Passed to the compositor thread and bound to a client via BindToClient. | 44 // 2. Passed to the compositor thread and bound to a client via BindToClient. |
| 45 // From here on, it will only be used on the compositor thread. | 45 // From here on, it will only be used on the compositor thread. |
| 46 // 3. If the 3D context is lost, then the compositor will delete the output | 46 // 3. If the 3D context is lost, then the compositor will delete the output |
| 47 // surface (on the compositor thread) and go back to step 1. | 47 // surface (on the compositor thread) and go back to step 1. |
| 48 class CC_EXPORT CompositorFrameSink | 48 class CC_EXPORT CompositorFrameSink |
| 49 : public base::trace_event::MemoryDumpProvider { | 49 : public base::trace_event::MemoryDumpProvider { |
| 50 public: | 50 public: |
| 51 struct Capabilities { | 51 struct Capabilities { |
| 52 Capabilities() = default; | 52 Capabilities() = default; |
| 53 | 53 |
| 54 // TODO(enne): Remove this since everything uses begin frames now, but it | |
| 55 // causes some racey unit tests to fail. | |
| 56 bool adjust_deadline_for_parent = true; | |
| 57 | |
| 58 // Whether ForceReclaimResources can be called to reclaim all resources | 54 // Whether ForceReclaimResources can be called to reclaim all resources |
| 59 // from the CompositorFrameSink. | 55 // from the CompositorFrameSink. |
| 60 bool can_force_reclaim_resources = false; | 56 bool can_force_reclaim_resources = false; |
| 61 // True if sync points for resources are needed when swapping delegated | 57 // True if sync points for resources are needed when swapping delegated |
| 62 // frames. | 58 // frames. |
| 63 bool delegated_sync_points_required = true; | 59 bool delegated_sync_points_required = true; |
| 64 }; | 60 }; |
| 65 | 61 |
| 66 // Constructor for GL-based and/or software compositing. | 62 // Constructor for GL-based and/or software compositing. |
| 67 explicit CompositorFrameSink( | 63 explicit CompositorFrameSink( |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 void DetachFromClientInternal(); | 138 void DetachFromClientInternal(); |
| 143 | 139 |
| 144 base::WeakPtrFactory<CompositorFrameSink> weak_ptr_factory_; | 140 base::WeakPtrFactory<CompositorFrameSink> weak_ptr_factory_; |
| 145 | 141 |
| 146 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSink); | 142 DISALLOW_COPY_AND_ASSIGN(CompositorFrameSink); |
| 147 }; | 143 }; |
| 148 | 144 |
| 149 } // namespace cc | 145 } // namespace cc |
| 150 | 146 |
| 151 #endif // CC_OUTPUT_COMPOSITOR_FRAME_SINK_H_ | 147 #endif // CC_OUTPUT_COMPOSITOR_FRAME_SINK_H_ |
| OLD | NEW |