| 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 24 matching lines...) Expand all Loading... |
| 35 public: | 35 public: |
| 36 explicit CompositorImpl(Compositor::Client* client); | 36 explicit CompositorImpl(Compositor::Client* client); |
| 37 virtual ~CompositorImpl(); | 37 virtual ~CompositorImpl(); |
| 38 | 38 |
| 39 static bool IsInitialized(); | 39 static bool IsInitialized(); |
| 40 static bool IsThreadingEnabled(); | 40 static bool IsThreadingEnabled(); |
| 41 | 41 |
| 42 // Returns true if initialized with DIRECT_CONTEXT_ON_DRAW_THREAD. | 42 // Returns true if initialized with DIRECT_CONTEXT_ON_DRAW_THREAD. |
| 43 static bool UsesDirectGL(); | 43 static bool UsesDirectGL(); |
| 44 | 44 |
| 45 // Returns the Java Surface object for a given view surface id. |
| 46 static jobject GetSurface(int surface_id); |
| 47 |
| 45 // Compositor implementation. | 48 // Compositor implementation. |
| 46 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) OVERRIDE; | 49 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) OVERRIDE; |
| 47 virtual void SetWindowSurface(ANativeWindow* window) OVERRIDE; | 50 virtual void SetWindowSurface(ANativeWindow* window) OVERRIDE; |
| 51 virtual void SetSurface(jobject surface) OVERRIDE; |
| 48 virtual void SetVisible(bool visible) OVERRIDE; | 52 virtual void SetVisible(bool visible) OVERRIDE; |
| 49 virtual void setDeviceScaleFactor(float factor) OVERRIDE; | 53 virtual void setDeviceScaleFactor(float factor) OVERRIDE; |
| 50 virtual void SetWindowBounds(const gfx::Size& size) OVERRIDE; | 54 virtual void SetWindowBounds(const gfx::Size& size) OVERRIDE; |
| 51 virtual void SetHasTransparentBackground(bool flag) OVERRIDE; | 55 virtual void SetHasTransparentBackground(bool flag) OVERRIDE; |
| 52 virtual bool CompositeAndReadback( | 56 virtual bool CompositeAndReadback( |
| 53 void *pixels, const gfx::Rect& rect) OVERRIDE; | 57 void *pixels, const gfx::Rect& rect) OVERRIDE; |
| 54 virtual void Composite() OVERRIDE; | 58 virtual void Composite() OVERRIDE; |
| 55 virtual WebKit::WebGLId GenerateTexture(gfx::JavaBitmap& bitmap) OVERRIDE; | 59 virtual WebKit::WebGLId GenerateTexture(gfx::JavaBitmap& bitmap) OVERRIDE; |
| 56 virtual WebKit::WebGLId GenerateCompressedTexture( | 60 virtual WebKit::WebGLId GenerateCompressedTexture( |
| 57 gfx::Size& size, int data_size, void* data) OVERRIDE; | 61 gfx::Size& size, int data_size, void* data) OVERRIDE; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 base::WeakPtrFactory<CompositorImpl> weak_factory_; | 109 base::WeakPtrFactory<CompositorImpl> weak_factory_; |
| 106 | 110 |
| 107 scoped_refptr<cc::ContextProvider> null_offscreen_context_provider_; | 111 scoped_refptr<cc::ContextProvider> null_offscreen_context_provider_; |
| 108 | 112 |
| 109 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); | 113 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); |
| 110 }; | 114 }; |
| 111 | 115 |
| 112 } // namespace content | 116 } // namespace content |
| 113 | 117 |
| 114 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 118 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
| OLD | NEW |