OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ |
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ | 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "cc/resources/ui_resource_bitmap.h" | 9 #include "cc/resources/ui_resource_bitmap.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 virtual void setDeviceScaleFactor(float factor) = 0; | 48 virtual void setDeviceScaleFactor(float factor) = 0; |
49 | 49 |
50 // Set the output surface bounds. | 50 // Set the output surface bounds. |
51 virtual void SetWindowBounds(const gfx::Size& size) = 0; | 51 virtual void SetWindowBounds(const gfx::Size& size) = 0; |
52 | 52 |
53 // Sets the window visibility. When becoming invisible, resources will get | 53 // Sets the window visibility. When becoming invisible, resources will get |
54 // freed and other calls into the compositor are not allowed until after | 54 // freed and other calls into the compositor are not allowed until after |
55 // having been made visible again. | 55 // having been made visible again. |
56 virtual void SetVisible(bool visible) = 0; | 56 virtual void SetVisible(bool visible) = 0; |
57 | 57 |
58 // Set the output surface handle which the compositor renders into. | |
59 // DEPRECATED: Use SetSurface() which takes a Java Surface object. | |
60 virtual void SetWindowSurface(ANativeWindow* window) = 0; | |
61 | |
62 // Set the output surface which the compositor renders into. | 58 // Set the output surface which the compositor renders into. |
63 virtual void SetSurface(jobject surface) = 0; | 59 virtual void SetSurface(jobject surface) = 0; |
64 | 60 |
65 // Tells the view tree to assume a transparent background when rendering. | 61 // Tells the view tree to assume a transparent background when rendering. |
66 virtual void SetHasTransparentBackground(bool flag) = 0; | 62 virtual void SetHasTransparentBackground(bool flag) = 0; |
67 | 63 |
68 // Request layout and draw. You only need to call this if you need to trigger | 64 // Request layout and draw. You only need to call this if you need to trigger |
69 // Composite *without* having modified the layer tree. | 65 // Composite *without* having modified the layer tree. |
70 virtual void SetNeedsComposite() = 0; | 66 virtual void SetNeedsComposite() = 0; |
71 | 67 |
72 // Returns the UI resource provider associated with the compositor. | 68 // Returns the UI resource provider associated with the compositor. |
73 virtual UIResourceProvider& GetUIResourceProvider() = 0; | 69 virtual UIResourceProvider& GetUIResourceProvider() = 0; |
74 | 70 |
75 protected: | 71 protected: |
76 Compositor() {} | 72 Compositor() {} |
77 }; | 73 }; |
78 | 74 |
79 } // namespace content | 75 } // namespace content |
80 | 76 |
81 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ | 77 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ |
OLD | NEW |