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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 public ui::WindowAndroidCompositor { | 42 public ui::WindowAndroidCompositor { |
43 public: | 43 public: |
44 CompositorImpl(CompositorClient* client, gfx::NativeWindow root_window); | 44 CompositorImpl(CompositorClient* client, gfx::NativeWindow root_window); |
45 virtual ~CompositorImpl(); | 45 virtual ~CompositorImpl(); |
46 | 46 |
47 static bool IsInitialized(); | 47 static bool IsInitialized(); |
48 | 48 |
49 // Returns the Java Surface object for a given view surface id. | 49 // Returns the Java Surface object for a given view surface id. |
50 static jobject GetSurface(int surface_id); | 50 static jobject GetSurface(int surface_id); |
51 | 51 |
52 // Returns the Java Surface object for a given surface texture. | |
53 static jobject GetSurfaceTextureSurface(int primary_id, int secondary_id); | |
no sievers
2014/03/24 19:26:08
Why did you follow the bad example from the existi
reveman
2014/03/25 01:31:23
Changed it to an explicit base::ProcessHandle wher
| |
54 | |
55 // Allocates a surface texture and returns primary id. Returns -1 on failure. | |
56 static int AllocateSurfaceTexture(int secondary_id); | |
57 | |
58 // Destroy all surface textures associated with |secondary_id|. | |
59 static void DestroyAllSurfaceTextures(int secondary_id); | |
60 | |
52 // Compositor implementation. | 61 // Compositor implementation. |
53 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) OVERRIDE; | 62 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) OVERRIDE; |
54 virtual void SetWindowSurface(ANativeWindow* window) OVERRIDE; | 63 virtual void SetWindowSurface(ANativeWindow* window) OVERRIDE; |
55 virtual void SetSurface(jobject surface) OVERRIDE; | 64 virtual void SetSurface(jobject surface) OVERRIDE; |
56 virtual void SetVisible(bool visible) OVERRIDE; | 65 virtual void SetVisible(bool visible) OVERRIDE; |
57 virtual void setDeviceScaleFactor(float factor) OVERRIDE; | 66 virtual void setDeviceScaleFactor(float factor) OVERRIDE; |
58 virtual void SetWindowBounds(const gfx::Size& size) OVERRIDE; | 67 virtual void SetWindowBounds(const gfx::Size& size) OVERRIDE; |
59 virtual void SetHasTransparentBackground(bool flag) OVERRIDE; | 68 virtual void SetHasTransparentBackground(bool flag) OVERRIDE; |
60 virtual bool CompositeAndReadback( | 69 virtual bool CompositeAndReadback( |
61 void *pixels, const gfx::Rect& rect) OVERRIDE; | 70 void *pixels, const gfx::Rect& rect) OVERRIDE; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
121 UIResourceMap ui_resource_map_; | 130 UIResourceMap ui_resource_map_; |
122 | 131 |
123 gfx::NativeWindow root_window_; | 132 gfx::NativeWindow root_window_; |
124 | 133 |
125 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); | 134 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); |
126 }; | 135 }; |
127 | 136 |
128 } // namespace content | 137 } // namespace content |
129 | 138 |
130 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 139 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
OLD | NEW |