| 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 "android_webview/browser/parent_compositor_draw_constraints.h" | 8 #include "android_webview/browser/parent_compositor_draw_constraints.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 ~DrawGLInput(); | 38 ~DrawGLInput(); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 // This class is used to pass data between UI thread and RenderThread. | 41 // This class is used to pass data between UI thread and RenderThread. |
| 42 class SharedRendererState { | 42 class SharedRendererState { |
| 43 public: | 43 public: |
| 44 SharedRendererState(scoped_refptr<base::MessageLoopProxy> ui_loop, | 44 SharedRendererState(scoped_refptr<base::MessageLoopProxy> ui_loop, |
| 45 BrowserViewRendererClient* client); | 45 BrowserViewRendererClient* client); |
| 46 ~SharedRendererState(); | 46 ~SharedRendererState(); |
| 47 | 47 |
| 48 bool CurrentlyOnUIThread(); |
| 48 void ClientRequestDrawGL(); | 49 void ClientRequestDrawGL(); |
| 49 | 50 |
| 50 void SetDrawGLInput(scoped_ptr<DrawGLInput> input); | 51 void SetDrawGLInput(scoped_ptr<DrawGLInput> input); |
| 51 scoped_ptr<DrawGLInput> PassDrawGLInput(); | 52 scoped_ptr<DrawGLInput> PassDrawGLInput(); |
| 52 | 53 |
| 53 bool IsInsideHardwareRelease() const; | 54 bool IsInsideHardwareRelease() const; |
| 54 void PostExternalDrawConstraintsToChildCompositor( | 55 void PostExternalDrawConstraintsToChildCompositor( |
| 55 const ParentCompositorDrawConstraints& parent_draw_constraints); | 56 const ParentCompositorDrawConstraints& parent_draw_constraints); |
| 56 | 57 |
| 57 const ParentCompositorDrawConstraints ParentDrawConstraints() const; | 58 const ParentCompositorDrawConstraints ParentDrawConstraints() const; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 95 |
| 95 private: | 96 private: |
| 96 SharedRendererState* shared_renderer_state_; | 97 SharedRendererState* shared_renderer_state_; |
| 97 | 98 |
| 98 DISALLOW_COPY_AND_ASSIGN(InsideHardwareReleaseReset); | 99 DISALLOW_COPY_AND_ASSIGN(InsideHardwareReleaseReset); |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 } // namespace android_webview | 102 } // namespace android_webview |
| 102 | 103 |
| 103 #endif // ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ | 104 #endif // ANDROID_WEBVIEW_BROWSER_SHARED_RENDERER_STATE_H_ |
| OLD | NEW |