| 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" |
| 11 #include "content/public/browser/android/ui_resource_provider.h" | |
| 12 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
| 13 #include "ui/gfx/rect.h" | 12 #include "ui/gfx/rect.h" |
| 14 #include "ui/gfx/size.h" | 13 #include "ui/gfx/size.h" |
| 15 | 14 |
| 16 class SkBitmap; | 15 class SkBitmap; |
| 17 | 16 |
| 18 namespace cc { | 17 namespace cc { |
| 19 class Layer; | 18 class Layer; |
| 20 } | 19 } |
| 21 | 20 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 // Set the output surface which the compositor renders into. | 61 // Set the output surface which the compositor renders into. |
| 63 virtual void SetSurface(jobject surface) = 0; | 62 virtual void SetSurface(jobject surface) = 0; |
| 64 | 63 |
| 65 // Tells the view tree to assume a transparent background when rendering. | 64 // Tells the view tree to assume a transparent background when rendering. |
| 66 virtual void SetHasTransparentBackground(bool flag) = 0; | 65 virtual void SetHasTransparentBackground(bool flag) = 0; |
| 67 | 66 |
| 68 // Request layout and draw. You only need to call this if you need to trigger | 67 // Request layout and draw. You only need to call this if you need to trigger |
| 69 // Composite *without* having modified the layer tree. | 68 // Composite *without* having modified the layer tree. |
| 70 virtual void SetNeedsComposite() = 0; | 69 virtual void SetNeedsComposite() = 0; |
| 71 | 70 |
| 72 // Returns the UI resource provider associated with the compositor. | |
| 73 virtual UIResourceProvider& GetUIResourceProvider() = 0; | |
| 74 | |
| 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 |