| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 namespace android_webview { | 24 namespace android_webview { |
| 25 | 25 |
| 26 class BrowserViewRendererClient; | 26 class BrowserViewRendererClient; |
| 27 | 27 |
| 28 // Set by BrowserViewRenderer and read by HardwareRenderer. | 28 // Set by BrowserViewRenderer and read by HardwareRenderer. |
| 29 struct DrawGLInput { | 29 struct DrawGLInput { |
| 30 gfx::Vector2d scroll_offset; | 30 gfx::Vector2d scroll_offset; |
| 31 int width; | 31 int width; |
| 32 int height; | 32 int height; |
| 33 cc::CompositorFrame frame; | 33 cc::CompositorFrame frame; |
| 34 bool has_transparent_background; | |
| 35 | 34 |
| 36 DrawGLInput(); | 35 DrawGLInput(); |
| 37 ~DrawGLInput(); | 36 ~DrawGLInput(); |
| 38 }; | 37 }; |
| 39 | 38 |
| 40 // This class is used to pass data between UI thread and RenderThread. | 39 // This class is used to pass data between UI thread and RenderThread. |
| 41 class SharedRendererState { | 40 class SharedRendererState { |
| 42 public: | 41 public: |
| 43 SharedRendererState(scoped_refptr<base::MessageLoopProxy> ui_loop, | 42 SharedRendererState(scoped_refptr<base::MessageLoopProxy> ui_loop, |
| 44 BrowserViewRendererClient* client); | 43 BrowserViewRendererClient* client); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 72 mutable base::Lock lock_; | 71 mutable base::Lock lock_; |
| 73 scoped_ptr<DrawGLInput> draw_gl_input_; | 72 scoped_ptr<DrawGLInput> draw_gl_input_; |
| 74 bool hardware_allowed_; | 73 bool hardware_allowed_; |
| 75 gpu::GLInProcessContext* share_context_; | 74 gpu::GLInProcessContext* share_context_; |
| 76 cc::ReturnedResourceArray returned_resources_; | 75 cc::ReturnedResourceArray returned_resources_; |
| 77 }; | 76 }; |
| 78 | 77 |
| 79 } // namespace android_webview | 78 } // namespace android_webview |
| 80 | 79 |
| 81 #endif // ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ | 80 #endif // ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ |
| OLD | NEW |