| 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_OUTPUT_SURFACE_CLIENT_H_ | 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ |
| 6 #define CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ | 6 #define CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
| 11 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
| 12 #include "cc/output/context_provider.h" | 12 #include "cc/output/context_provider.h" |
| 13 #include "cc/resources/returned_resource.h" | 13 #include "cc/resources/returned_resource.h" |
| 14 #include "gpu/command_buffer/common/texture_in_use_response.h" | 14 #include "gpu/command_buffer/common/texture_in_use_response.h" |
| 15 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
| 16 | 16 |
| 17 namespace gfx { | 17 namespace gfx { |
| 18 class Transform; | 18 class Transform; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace cc { | 21 namespace cc { |
| 22 | 22 |
| 23 class BeginFrameSource; | 23 class BeginFrameSource; |
| 24 struct ManagedMemoryPolicy; | 24 struct ManagedMemoryPolicy; |
| 25 | 25 |
| 26 class CC_EXPORT OutputSurfaceClient { | 26 class CC_EXPORT OutputSurfaceClient { |
| 27 public: | 27 public: |
| 28 // TODO(enne): Remove this in favor of using SetBeginFrameSource. |
| 29 virtual void CommitVSyncParameters(base::TimeTicks timebase, |
| 30 base::TimeDelta interval) = 0; |
| 28 // Pass the begin frame source for the client to observe. Client does not own | 31 // Pass the begin frame source for the client to observe. Client does not own |
| 29 // the BeginFrameSource. OutputSurface should call this once after binding to | 32 // the BeginFrameSource. OutputSurface should call this once after binding to |
| 30 // the client and then call again with a null while detaching. | 33 // the client and then call again with a null while detaching. |
| 31 virtual void SetBeginFrameSource(BeginFrameSource* source) = 0; | 34 virtual void SetBeginFrameSource(BeginFrameSource* source) = 0; |
| 32 | 35 |
| 33 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) = 0; | 36 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) = 0; |
| 34 // For LayerTreeHostImpl, this is more of a OnSwapBuffersAck from the display | 37 // For LayerTreeHostImpl, this is more of a OnSwapBuffersAck from the display |
| 35 // compositor that it received and will use the frame, unblocking it from | 38 // compositor that it received and will use the frame, unblocking it from |
| 36 // producing more frames. | 39 // producing more frames. |
| 37 // For the display compositor this is literally a notification that the swap | 40 // For the display compositor this is literally a notification that the swap |
| (...skipping 17 matching lines...) Expand all Loading... |
| 55 const gfx::Rect& viewport, | 58 const gfx::Rect& viewport, |
| 56 bool resourceless_software_draw) = 0; | 59 bool resourceless_software_draw) = 0; |
| 57 | 60 |
| 58 protected: | 61 protected: |
| 59 virtual ~OutputSurfaceClient() {} | 62 virtual ~OutputSurfaceClient() {} |
| 60 }; | 63 }; |
| 61 | 64 |
| 62 } // namespace cc | 65 } // namespace cc |
| 63 | 66 |
| 64 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ | 67 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ |
| OLD | NEW |