| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_EXO_SURFACE_H_ | 5 #ifndef COMPONENTS_EXO_SURFACE_H_ |
| 6 #define COMPONENTS_EXO_SURFACE_H_ | 6 #define COMPONENTS_EXO_SURFACE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 // Surface does not own observers. It is the responsibility of the observer | 185 // Surface does not own observers. It is the responsibility of the observer |
| 186 // to remove itself when it is done observing. | 186 // to remove itself when it is done observing. |
| 187 void AddSurfaceObserver(SurfaceObserver* observer); | 187 void AddSurfaceObserver(SurfaceObserver* observer); |
| 188 void RemoveSurfaceObserver(SurfaceObserver* observer); | 188 void RemoveSurfaceObserver(SurfaceObserver* observer); |
| 189 bool HasSurfaceObserver(const SurfaceObserver* observer) const; | 189 bool HasSurfaceObserver(const SurfaceObserver* observer) const; |
| 190 | 190 |
| 191 // Returns a trace value representing the state of the surface. | 191 // Returns a trace value representing the state of the surface. |
| 192 std::unique_ptr<base::trace_event::TracedValue> AsTracedValue() const; | 192 std::unique_ptr<base::trace_event::TracedValue> AsTracedValue() const; |
| 193 | 193 |
| 194 // Call this to indicate that surface is being scheduled for a draw. | 194 // Call this to indicate that the previous CompositorFrame is processed and |
| 195 void WillDraw(); | 195 // the surface is being scheduled for a draw. |
| 196 void DidReceiveCompositorFrameAck(); |
| 196 | 197 |
| 197 // Called when the begin frame source has changed. | 198 // Called when the begin frame source has changed. |
| 198 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source); | 199 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source); |
| 199 | 200 |
| 200 // Check whether this Surface and its children need to create new cc::Surface | 201 // Check whether this Surface and its children need to create new cc::Surface |
| 201 // IDs for their contents next time they get new buffer contents. | 202 // IDs for their contents next time they get new buffer contents. |
| 202 void CheckIfSurfaceHierarchyNeedsCommitToNewSurfaces(); | 203 void CheckIfSurfaceHierarchyNeedsCommitToNewSurfaces(); |
| 203 | 204 |
| 204 // Returns the active contents size. | 205 // Returns the active contents size. |
| 205 gfx::Size content_size() const { return content_size_; } | 206 gfx::Size content_size() const { return content_size_; } |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 cc::BeginFrameSource* begin_frame_source_ = nullptr; | 399 cc::BeginFrameSource* begin_frame_source_ = nullptr; |
| 399 bool needs_begin_frame_ = false; | 400 bool needs_begin_frame_ = false; |
| 400 cc::BeginFrameAck current_begin_frame_ack_; | 401 cc::BeginFrameAck current_begin_frame_ack_; |
| 401 | 402 |
| 402 DISALLOW_COPY_AND_ASSIGN(Surface); | 403 DISALLOW_COPY_AND_ASSIGN(Surface); |
| 403 }; | 404 }; |
| 404 | 405 |
| 405 } // namespace exo | 406 } // namespace exo |
| 406 | 407 |
| 407 #endif // COMPONENTS_EXO_SURFACE_H_ | 408 #endif // COMPONENTS_EXO_SURFACE_H_ |
| OLD | NEW |