| 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/memory/ref_counted.h" |
| 8 #include "base/time.h" | 9 #include "base/time.h" |
| 9 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| 10 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
| 11 | 12 |
| 12 namespace cc { | 13 namespace cc { |
| 13 | 14 |
| 14 class CompositorFrameAck; | 15 class CompositorFrameAck; |
| 16 class ContextProvider; |
| 15 | 17 |
| 16 class CC_EXPORT OutputSurfaceClient { | 18 class CC_EXPORT OutputSurfaceClient { |
| 17 public: | 19 public: |
| 20 // Called to synchronously re-initialize using the Context3D. Upon returning |
| 21 // the compositor should be able to draw using GL what was previously |
| 22 // committed. |
| 23 virtual bool DeferredInitialize( |
| 24 scoped_refptr<ContextProvider> offscreen_context_provider) = 0; |
| 18 virtual void SetNeedsRedrawRect(gfx::Rect damage_rect) = 0; | 25 virtual void SetNeedsRedrawRect(gfx::Rect damage_rect) = 0; |
| 19 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, | 26 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, |
| 20 base::TimeDelta interval) = 0; | 27 base::TimeDelta interval) = 0; |
| 21 virtual void BeginFrame(base::TimeTicks frame_time) = 0; | 28 virtual void BeginFrame(base::TimeTicks frame_time) = 0; |
| 22 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck&) = 0; | 29 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck&) = 0; |
| 23 virtual void OnSwapBuffersComplete() = 0; | 30 virtual void OnSwapBuffersComplete() = 0; |
| 24 virtual void DidLoseOutputSurface() = 0; | 31 virtual void DidLoseOutputSurface() = 0; |
| 25 | 32 |
| 26 protected: | 33 protected: |
| 27 virtual ~OutputSurfaceClient() {} | 34 virtual ~OutputSurfaceClient() {} |
| 28 }; | 35 }; |
| 29 | 36 |
| 30 } // namespace cc | 37 } // namespace cc |
| 31 | 38 |
| 32 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ | 39 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ |
| OLD | NEW |