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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, | 70 virtual void applyScrollAndScale(gfx::Vector2d scrollDelta, |
71 float pageScale) OVERRIDE; | 71 float pageScale) OVERRIDE; |
72 virtual scoped_ptr<cc::OutputSurface> createOutputSurface() OVERRIDE; | 72 virtual scoped_ptr<cc::OutputSurface> createOutputSurface() OVERRIDE; |
73 virtual scoped_ptr<cc::InputHandler> createInputHandler() OVERRIDE; | 73 virtual scoped_ptr<cc::InputHandler> createInputHandler() OVERRIDE; |
74 virtual void didRecreateOutputSurface(bool success) OVERRIDE; | 74 virtual void didRecreateOutputSurface(bool success) OVERRIDE; |
75 virtual void willCommit() OVERRIDE {} | 75 virtual void willCommit() OVERRIDE {} |
76 virtual void didCommit() OVERRIDE; | 76 virtual void didCommit() OVERRIDE; |
77 virtual void didCommitAndDrawFrame() OVERRIDE; | 77 virtual void didCommitAndDrawFrame() OVERRIDE; |
78 virtual void didCompleteSwapBuffers() OVERRIDE; | 78 virtual void didCompleteSwapBuffers() OVERRIDE; |
79 virtual void scheduleComposite() OVERRIDE; | 79 virtual void scheduleComposite() OVERRIDE; |
| 80 virtual scoped_refptr<ui::ContextProvider> |
| 81 OffscreenContextProviderForMainThread() OVERRIDE; |
| 82 virtual scoped_refptr<ui::ContextProvider> |
| 83 OffscreenContextProviderForCompositorThread() OVERRIDE; |
80 | 84 |
81 // WebGraphicsContext3DSwapBuffersClient implementation. | 85 // WebGraphicsContext3DSwapBuffersClient implementation. |
82 virtual void OnViewContextSwapBuffersPosted() OVERRIDE; | 86 virtual void OnViewContextSwapBuffersPosted() OVERRIDE; |
83 virtual void OnViewContextSwapBuffersComplete() OVERRIDE; | 87 virtual void OnViewContextSwapBuffersComplete() OVERRIDE; |
84 virtual void OnViewContextSwapBuffersAborted() OVERRIDE; | 88 virtual void OnViewContextSwapBuffersAborted() OVERRIDE; |
85 | 89 |
86 private: | 90 private: |
87 WebKit::WebGLId BuildBasicTexture(); | 91 WebKit::WebGLId BuildBasicTexture(); |
88 WebKit::WGC3Denum GetGLFormatForBitmap(gfx::JavaBitmap& bitmap); | 92 WebKit::WGC3Denum GetGLFormatForBitmap(gfx::JavaBitmap& bitmap); |
89 WebKit::WGC3Denum GetGLTypeForBitmap(gfx::JavaBitmap& bitmap); | 93 WebKit::WGC3Denum GetGLTypeForBitmap(gfx::JavaBitmap& bitmap); |
90 | 94 |
91 scoped_refptr<cc::Layer> root_layer_; | 95 scoped_refptr<cc::Layer> root_layer_; |
92 scoped_ptr<cc::LayerTreeHost> host_; | 96 scoped_ptr<cc::LayerTreeHost> host_; |
93 | 97 |
94 gfx::Size size_; | 98 gfx::Size size_; |
95 bool has_transparent_background_; | 99 bool has_transparent_background_; |
96 | 100 |
97 ANativeWindow* window_; | 101 ANativeWindow* window_; |
98 int surface_id_; | 102 int surface_id_; |
99 | 103 |
100 Compositor::Client* client_; | 104 Compositor::Client* client_; |
101 base::WeakPtrFactory<CompositorImpl> weak_factory_; | 105 base::WeakPtrFactory<CompositorImpl> weak_factory_; |
102 | 106 |
| 107 scoped_refptr<ui::ContextProvider> null_offscreen_context_provider_; |
| 108 |
103 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); | 109 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); |
104 }; | 110 }; |
105 | 111 |
106 } // namespace content | 112 } // namespace content |
107 | 113 |
108 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 114 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
OLD | NEW |