Chromium Code Reviews| 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 "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 // Initialize with flags. This should only be called once instead | 53 // Initialize with flags. This should only be called once instead |
| 54 // of Initialize(). | 54 // of Initialize(). |
| 55 static void InitializeWithFlags(uint32 flags); | 55 static void InitializeWithFlags(uint32 flags); |
| 56 | 56 |
| 57 // Creates and returns a compositor instance. | 57 // Creates and returns a compositor instance. |
| 58 static Compositor* Create(Client* client); | 58 static Compositor* Create(Client* client); |
| 59 | 59 |
| 60 // Attaches the layer tree. | 60 // Attaches the layer tree. |
| 61 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) = 0; | 61 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) = 0; |
| 62 | 62 |
| 63 // Set the scale factor from dp to pixel. | |
|
aelias_OOO_until_Jul13
2013/02/12 00:16:07
Nit: we usually write "DIP" (for "density independ
| |
| 64 virtual void setDeviceScaleFactor(float factor) = 0; | |
| 65 | |
| 63 // Set the output surface bounds. | 66 // Set the output surface bounds. |
| 64 virtual void SetWindowBounds(const gfx::Size& size) = 0; | 67 virtual void SetWindowBounds(const gfx::Size& size) = 0; |
| 65 | 68 |
| 66 // Sets the window visibility. When becoming invisible, resources will get | 69 // Sets the window visibility. When becoming invisible, resources will get |
| 67 // freed and other calls into the compositor are not allowed until after | 70 // freed and other calls into the compositor are not allowed until after |
| 68 // having been made visible again. | 71 // having been made visible again. |
| 69 virtual void SetVisible(bool visible) = 0; | 72 virtual void SetVisible(bool visible) = 0; |
| 70 | 73 |
| 71 // Set the output surface handle which the compositor renders into. | 74 // Set the output surface handle which the compositor renders into. |
| 72 virtual void SetWindowSurface(ANativeWindow* window) = 0; | 75 virtual void SetWindowSurface(ANativeWindow* window) = 0; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 virtual bool CopyTextureToBitmap(WebKit::WebGLId texture_id, | 110 virtual bool CopyTextureToBitmap(WebKit::WebGLId texture_id, |
| 108 const gfx::Rect& src_rect, | 111 const gfx::Rect& src_rect, |
| 109 gfx::JavaBitmap& bitmap) = 0; | 112 gfx::JavaBitmap& bitmap) = 0; |
| 110 protected: | 113 protected: |
| 111 Compositor() {} | 114 Compositor() {} |
| 112 }; | 115 }; |
| 113 | 116 |
| 114 } // namespace content | 117 } // namespace content |
| 115 | 118 |
| 116 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ | 119 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ |
| OLD | NEW |