| 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_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 static bool IsInitialized(); | 40 static bool IsInitialized(); |
| 41 static bool IsThreadingEnabled(); | 41 static bool IsThreadingEnabled(); |
| 42 | 42 |
| 43 // Returns true if initialized with DIRECT_CONTEXT_ON_DRAW_THREAD. | 43 // Returns true if initialized with DIRECT_CONTEXT_ON_DRAW_THREAD. |
| 44 static bool UsesDirectGL(); | 44 static bool UsesDirectGL(); |
| 45 | 45 |
| 46 // Compositor implementation. | 46 // Compositor implementation. |
| 47 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) OVERRIDE; | 47 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) OVERRIDE; |
| 48 virtual void SetWindowSurface(ANativeWindow* window) OVERRIDE; | 48 virtual void SetWindowSurface(ANativeWindow* window) OVERRIDE; |
| 49 virtual void SetVisible(bool visible) OVERRIDE; | 49 virtual void SetVisible(bool visible) OVERRIDE; |
| 50 virtual void setDeviceScaleFactor(float factor) OVERRIDE; |
| 50 virtual void SetWindowBounds(const gfx::Size& size) OVERRIDE; | 51 virtual void SetWindowBounds(const gfx::Size& size) OVERRIDE; |
| 51 virtual void SetHasTransparentBackground(bool flag) OVERRIDE; | 52 virtual void SetHasTransparentBackground(bool flag) OVERRIDE; |
| 52 virtual bool CompositeAndReadback( | 53 virtual bool CompositeAndReadback( |
| 53 void *pixels, const gfx::Rect& rect) OVERRIDE; | 54 void *pixels, const gfx::Rect& rect) OVERRIDE; |
| 54 virtual void Composite() OVERRIDE; | 55 virtual void Composite() OVERRIDE; |
| 55 virtual WebKit::WebGLId GenerateTexture(gfx::JavaBitmap& bitmap) OVERRIDE; | 56 virtual WebKit::WebGLId GenerateTexture(gfx::JavaBitmap& bitmap) OVERRIDE; |
| 56 virtual WebKit::WebGLId GenerateCompressedTexture( | 57 virtual WebKit::WebGLId GenerateCompressedTexture( |
| 57 gfx::Size& size, int data_size, void* data) OVERRIDE; | 58 gfx::Size& size, int data_size, void* data) OVERRIDE; |
| 58 virtual void DeleteTexture(WebKit::WebGLId texture_id) OVERRIDE; | 59 virtual void DeleteTexture(WebKit::WebGLId texture_id) OVERRIDE; |
| 59 virtual bool CopyTextureToBitmap(WebKit::WebGLId texture_id, | 60 virtual bool CopyTextureToBitmap(WebKit::WebGLId texture_id, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 101 |
| 101 Compositor::Client* client_; | 102 Compositor::Client* client_; |
| 102 base::WeakPtrFactory<CompositorImpl> weak_factory_; | 103 base::WeakPtrFactory<CompositorImpl> weak_factory_; |
| 103 | 104 |
| 104 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); | 105 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 } // namespace content | 108 } // namespace content |
| 108 | 109 |
| 109 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 110 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
| OLD | NEW |