| 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 "third_party/skia/include/core/SkBitmap.h" |
| 15 #include "ui/gfx/geometry/rect.h" | 16 #include "ui/gfx/geometry/rect.h" |
| 16 | 17 |
| 17 namespace cc { | 18 namespace cc { |
| 18 | 19 |
| 19 class CC_EXPORT OutputSurfaceClient { | 20 class CC_EXPORT OutputSurfaceClient { |
| 20 public: | 21 public: |
| 21 // A notification that the swap of the backbuffer to the hardware is complete | 22 // A notification that the swap of the backbuffer to the hardware is complete |
| 22 // and is now visible to the user. | 23 // and is now visible to the user. |
| 23 virtual void DidReceiveSwapBuffersAck() = 0; | 24 virtual void DidReceiveSwapBuffersAck() = 0; |
| 24 | 25 |
| 25 // For surfaceless/ozone implementations to create damage for the next frame. | 26 // For surfaceless/ozone implementations to create damage for the next frame. |
| 26 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) = 0; | 27 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) = 0; |
| 27 | 28 |
| 28 // For overlays. | 29 // For overlays. |
| 29 virtual void DidReceiveTextureInUseResponses( | 30 virtual void DidReceiveTextureInUseResponses( |
| 30 const gpu::TextureInUseResponses& responses) = 0; | 31 const gpu::TextureInUseResponses& responses) = 0; |
| 31 | 32 |
| 33 // Readback the contents of last swapped overlay textures. |
| 34 virtual void ReadbackSwappedOverlayTextures( |
| 35 std::vector<SkBitmap>* bitmaps, |
| 36 const base::Callback<void(bool)>& callback) = 0; |
| 37 |
| 32 protected: | 38 protected: |
| 33 virtual ~OutputSurfaceClient() {} | 39 virtual ~OutputSurfaceClient() {} |
| 34 }; | 40 }; |
| 35 | 41 |
| 36 } // namespace cc | 42 } // namespace cc |
| 37 | 43 |
| 38 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ | 44 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ |
| OLD | NEW |