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 "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
| 10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 | 63 |
| 64 // Generates an OpenGL compressed texture and returns a texture handle. May | 64 // Generates an OpenGL compressed texture and returns a texture handle. May |
| 65 // return 0 if the current context is lost. | 65 // return 0 if the current context is lost. |
| 66 virtual WebKit::WebGLId GenerateCompressedTexture(gfx::Size& size, | 66 virtual WebKit::WebGLId GenerateCompressedTexture(gfx::Size& size, |
| 67 int data_size, | 67 int data_size, |
| 68 void* data) = 0; | 68 void* data) = 0; |
| 69 | 69 |
| 70 // Deletes an OpenGL texture. | 70 // Deletes an OpenGL texture. |
| 71 virtual void DeleteTexture(WebKit::WebGLId texture_id) = 0; | 71 virtual void DeleteTexture(WebKit::WebGLId texture_id) = 0; |
| 72 | 72 |
| 73 // Grabs a copy of |texture_id| and saves it into |bitmap|. No scaling is | |
| 74 // done. It is assumed that the texture size matches that of the bitmap. | |
| 75 virtual void CopyTextureToBitmap(WebKit::WebGLId texture_id, | |
| 76 gfx::JavaBitmap& bitmap) = 0; | |
|
no sievers
2012/10/20 00:42:36
Do you really need to add this generic interface?
David Trainor- moved to gerrit
2012/10/22 08:31:07
For ContentViewCore#getBitmap it is, but for some
| |
| 73 protected: | 77 protected: |
| 74 Compositor() {} | 78 Compositor() {} |
| 75 }; | 79 }; |
| 76 | 80 |
| 77 } // namespace content | 81 } // namespace content |
| 78 | 82 |
| 79 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ | 83 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ |
| OLD | NEW |