OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 ANDROID_WEBVIEW_BROWSER_COMPOSITOR_FRAME_CONSUMER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_COMPOSITOR_FRAME_CONSUMER_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_COMPOSITOR_FRAME_CONSUMER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_COMPOSITOR_FRAME_CONSUMER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "android_webview/browser/child_frame.h" | 10 #include "android_webview/browser/child_frame.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 // The producer is responsible for managing the relationship with its | 36 // The producer is responsible for managing the relationship with its |
37 // consumers. The only exception to this is when a consumer is explicitly | 37 // consumers. The only exception to this is when a consumer is explicitly |
38 // destroyed, at which point it needs to inform its producer. | 38 // destroyed, at which point it needs to inform its producer. |
39 // In order to register a consumer with a new producer, the current producer | 39 // In order to register a consumer with a new producer, the current producer |
40 // must unregister the consumer, and call SetCompositorProducer(nullptr). | 40 // must unregister the consumer, and call SetCompositorProducer(nullptr). |
41 virtual void SetCompositorFrameProducer( | 41 virtual void SetCompositorFrameProducer( |
42 CompositorFrameProducer* compositor_frame_producer) = 0; | 42 CompositorFrameProducer* compositor_frame_producer) = 0; |
43 virtual void SetScrollOffsetOnUI(gfx::Vector2d scroll_offset) = 0; | 43 virtual void SetScrollOffsetOnUI(gfx::Vector2d scroll_offset) = 0; |
44 // Returns uncommitted frame to be returned, if any. | 44 // Returns uncommitted frame to be returned, if any. |
45 virtual std::unique_ptr<ChildFrame> SetFrameOnUI( | 45 virtual std::unique_ptr<ChildFrame> SetFrameOnUI( |
46 std::unique_ptr<ChildFrame> frame); | 46 std::unique_ptr<ChildFrame> frame) = 0; |
47 virtual void InitializeHardwareDrawIfNeededOnUI() = 0; | 47 virtual void InitializeHardwareDrawIfNeededOnUI() = 0; |
48 virtual ParentCompositorDrawConstraints GetParentDrawConstraintsOnUI() | 48 virtual ParentCompositorDrawConstraints GetParentDrawConstraintsOnUI() |
49 const = 0; | 49 const = 0; |
50 virtual void SwapReturnedResourcesOnUI( | 50 virtual void SwapReturnedResourcesOnUI( |
51 ReturnedResourcesMap* returned_resource_map) = 0; | 51 ReturnedResourcesMap* returned_resource_map) = 0; |
52 virtual bool ReturnedResourcesEmptyOnUI() const = 0; | 52 virtual bool ReturnedResourcesEmptyOnUI() const = 0; |
53 virtual ChildFrameQueue PassUncommittedFrameOnUI() = 0; | 53 virtual ChildFrameQueue PassUncommittedFrameOnUI() = 0; |
54 virtual bool HasFrameOnUI() const = 0; | 54 virtual bool HasFrameOnUI() const = 0; |
55 virtual void DeleteHardwareRendererOnUI() = 0; | 55 virtual void DeleteHardwareRendererOnUI() = 0; |
56 | 56 |
57 protected: | 57 protected: |
58 virtual ~CompositorFrameConsumer() {} | 58 virtual ~CompositorFrameConsumer() {} |
59 }; | 59 }; |
60 | 60 |
61 } // namespace android_webview | 61 } // namespace android_webview |
62 | 62 |
63 #endif // ANDROID_WEBVIEW_BROWSER_COMPOSITOR_FRAME_PRODUCER_H_ | 63 #endif // ANDROID_WEBVIEW_BROWSER_COMPOSITOR_FRAME_PRODUCER_H_ |
OLD | NEW |