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 "cc/resources/ui_resource_client.h" | 10 #include "cc/resources/ui_resource_client.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // having been made visible again. | 54 // having been made visible again. |
55 virtual void SetVisible(bool visible) = 0; | 55 virtual void SetVisible(bool visible) = 0; |
56 | 56 |
57 // Set the output surface handle which the compositor renders into. | 57 // Set the output surface handle which the compositor renders into. |
58 // DEPRECATED: Use SetSurface() which takes a Java Surface object. | 58 // DEPRECATED: Use SetSurface() which takes a Java Surface object. |
59 virtual void SetWindowSurface(ANativeWindow* window) = 0; | 59 virtual void SetWindowSurface(ANativeWindow* window) = 0; |
60 | 60 |
61 // Set the output surface which the compositor renders into. | 61 // Set the output surface which the compositor renders into. |
62 virtual void SetSurface(jobject surface) = 0; | 62 virtual void SetSurface(jobject surface) = 0; |
63 | 63 |
| 64 // Tells the view tree to assume a transparent background when rendering. |
| 65 virtual void SetHasTransparentBackground(bool flag) = 0; |
| 66 |
64 // Attempts to composite and read back the result into the provided buffer. | 67 // Attempts to composite and read back the result into the provided buffer. |
65 // The buffer must be at least window width * height * 4 (RGBA) bytes large. | 68 // The buffer must be at least window width * height * 4 (RGBA) bytes large. |
66 // The buffer is not modified if false is returned. | 69 // The buffer is not modified if false is returned. |
67 virtual bool CompositeAndReadback(void *pixels, const gfx::Rect& rect) = 0; | 70 virtual bool CompositeAndReadback(void *pixels, const gfx::Rect& rect) = 0; |
68 | 71 |
69 // Composite immediately. Used in single-threaded mode. | 72 // Composite immediately. Used in single-threaded mode. |
70 virtual void Composite() = 0; | 73 virtual void Composite() = 0; |
71 | 74 |
72 // Generates a UIResource and returns a UIResourceId. May return 0. | 75 // Generates a UIResource and returns a UIResourceId. May return 0. |
73 virtual cc::UIResourceId GenerateUIResource( | 76 virtual cc::UIResourceId GenerateUIResource( |
(...skipping 27 matching lines...) Expand all Loading... |
101 virtual bool CopyTextureToBitmap(blink::WebGLId texture_id, | 104 virtual bool CopyTextureToBitmap(blink::WebGLId texture_id, |
102 const gfx::Rect& src_rect, | 105 const gfx::Rect& src_rect, |
103 gfx::JavaBitmap& bitmap) = 0; | 106 gfx::JavaBitmap& bitmap) = 0; |
104 protected: | 107 protected: |
105 Compositor() {} | 108 Compositor() {} |
106 }; | 109 }; |
107 | 110 |
108 } // namespace content | 111 } // namespace content |
109 | 112 |
110 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ | 113 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ |
OLD | NEW |