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