Chromium Code Reviews| 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 gfx { | 18 namespace gfx { |
| 18 class Transform; | 19 class Transform; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace cc { | 22 namespace cc { |
| 22 | 23 |
| 23 class BeginFrameSource; | 24 class BeginFrameSource; |
| 24 struct ManagedMemoryPolicy; | 25 struct ManagedMemoryPolicy; |
| 25 | 26 |
| 26 class CC_EXPORT OutputSurfaceClient { | 27 class CC_EXPORT OutputSurfaceClient { |
| 27 public: | 28 public: |
| 28 // A notification that the swap of the backbuffer to the hardware is complete | 29 // A notification that the swap of the backbuffer to the hardware is complete |
| 29 // and is now visible to the user. | 30 // and is now visible to the user. |
| 30 virtual void DidReceiveSwapBuffersAck() = 0; | 31 virtual void DidReceiveSwapBuffersAck() = 0; |
| 31 | 32 |
| 32 // For surfaceless/ozone implementations to create damage for the next frame. | 33 // For surfaceless/ozone implementations to create damage for the next frame. |
| 33 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) = 0; | 34 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) = 0; |
| 34 | 35 |
| 35 // For overlays. | 36 // For overlays. |
| 36 virtual void DidReceiveTextureInUseResponses( | 37 virtual void DidReceiveTextureInUseResponses( |
| 37 const gpu::TextureInUseResponses& responses) = 0; | 38 const gpu::TextureInUseResponses& responses) = 0; |
| 38 | 39 |
| 40 // Readback the contents of last swapped overlay textures. | |
| 41 virtual void ReadbackSwappedOverlayTextures( | |
| 42 std::vector<SkBitmap>* bitmaps, | |
|
danakj
2016/11/01 23:33:01
why not a parameter of the Callback?
reveman
2016/11/02 00:37:05
It just evolved this way. I guess the alternative
| |
| 43 const base::Callback<void(bool)>& callback) = 0; | |
| 44 | |
| 39 protected: | 45 protected: |
| 40 virtual ~OutputSurfaceClient() {} | 46 virtual ~OutputSurfaceClient() {} |
| 41 }; | 47 }; |
| 42 | 48 |
| 43 } // namespace cc | 49 } // namespace cc |
| 44 | 50 |
| 45 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ | 51 #endif // CC_OUTPUT_OUTPUT_SURFACE_CLIENT_H_ |
| OLD | NEW |