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_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/containers/scoped_ptr_hash_map.h" | 10 #include "base/containers/scoped_ptr_hash_map.h" |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 40 public ImageTransportFactoryAndroidObserver { | 40 public ImageTransportFactoryAndroidObserver { |
| 41 public: | 41 public: |
| 42 CompositorImpl(CompositorClient* client, gfx::NativeWindow root_window); | 42 CompositorImpl(CompositorClient* client, gfx::NativeWindow root_window); |
| 43 virtual ~CompositorImpl(); | 43 virtual ~CompositorImpl(); |
| 44 | 44 |
| 45 static bool IsInitialized(); | 45 static bool IsInitialized(); |
| 46 | 46 |
| 47 // Returns the Java Surface object for a given view surface id. | 47 // Returns the Java Surface object for a given view surface id. |
| 48 static jobject GetSurface(int surface_id); | 48 static jobject GetSurface(int surface_id); |
| 49 | 49 |
| 50 // Returns the Java Surface object for a given surface texture id. | |
| 51 static jobject GetSurfaceTextureSurface(int surface_texture_id); | |
| 52 | |
| 53 // Allocates a SurfaceTexture and returns a surface texture id. Returns -1 | |
| 54 // on failure. | |
| 55 static int AllocateSurfaceTexture(); | |
|
epennerAtGoogle
2014/03/12 00:45:06
Could this and the above possibly be fused? Is the
reveman
2014/03/12 16:07:06
surface_texture_id generation (giving the renderer
| |
| 56 | |
| 50 // Compositor implementation. | 57 // Compositor implementation. |
| 51 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) OVERRIDE; | 58 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) OVERRIDE; |
| 52 virtual void SetWindowSurface(ANativeWindow* window) OVERRIDE; | 59 virtual void SetWindowSurface(ANativeWindow* window) OVERRIDE; |
| 53 virtual void SetSurface(jobject surface) OVERRIDE; | 60 virtual void SetSurface(jobject surface) OVERRIDE; |
| 54 virtual void SetVisible(bool visible) OVERRIDE; | 61 virtual void SetVisible(bool visible) OVERRIDE; |
| 55 virtual void setDeviceScaleFactor(float factor) OVERRIDE; | 62 virtual void setDeviceScaleFactor(float factor) OVERRIDE; |
| 56 virtual void SetWindowBounds(const gfx::Size& size) OVERRIDE; | 63 virtual void SetWindowBounds(const gfx::Size& size) OVERRIDE; |
| 57 virtual void SetHasTransparentBackground(bool flag) OVERRIDE; | 64 virtual void SetHasTransparentBackground(bool flag) OVERRIDE; |
| 58 virtual bool CompositeAndReadback( | 65 virtual bool CompositeAndReadback( |
| 59 void *pixels, const gfx::Rect& rect) OVERRIDE; | 66 void *pixels, const gfx::Rect& rect) OVERRIDE; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 116 UIResourceMap ui_resource_map_; | 123 UIResourceMap ui_resource_map_; |
| 117 | 124 |
| 118 gfx::NativeWindow root_window_; | 125 gfx::NativeWindow root_window_; |
| 119 | 126 |
| 120 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); | 127 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); |
| 121 }; | 128 }; |
| 122 | 129 |
| 123 } // namespace content | 130 } // namespace content |
| 124 | 131 |
| 125 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 132 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
| OLD | NEW |