OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ |
6 #define ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ |
7 | 7 |
8 #include "android_webview/browser/browser_view_renderer_impl.h" | 8 #include "android_webview/browser/browser_view_renderer_impl.h" |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 virtual void OnAttachedToWindow(int width, int height) OVERRIDE; | 48 virtual void OnAttachedToWindow(int width, int height) OVERRIDE; |
49 virtual void OnDetachedFromWindow() OVERRIDE; | 49 virtual void OnDetachedFromWindow() OVERRIDE; |
50 virtual bool IsAttachedToWindow() OVERRIDE; | 50 virtual bool IsAttachedToWindow() OVERRIDE; |
51 virtual bool IsViewVisible() OVERRIDE; | 51 virtual bool IsViewVisible() OVERRIDE; |
52 virtual gfx::Rect GetScreenRect() OVERRIDE; | 52 virtual gfx::Rect GetScreenRect() OVERRIDE; |
53 | 53 |
54 // SynchronousCompositorClient overrides | 54 // SynchronousCompositorClient overrides |
55 virtual void DidDestroyCompositor( | 55 virtual void DidDestroyCompositor( |
56 content::SynchronousCompositor* compositor) OVERRIDE; | 56 content::SynchronousCompositor* compositor) OVERRIDE; |
57 virtual void SetContinuousInvalidate(bool invalidate) OVERRIDE; | 57 virtual void SetContinuousInvalidate(bool invalidate) OVERRIDE; |
| 58 virtual void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value) OVERRIDE; |
| 59 virtual gfx::Vector2dF GetTotalRootLayerScrollOffset() OVERRIDE; |
58 | 60 |
59 void WebContentsGone(); | 61 void WebContentsGone(); |
60 | 62 |
61 private: | 63 private: |
62 void Invalidate(); | 64 void Invalidate(); |
63 void EnsureContinuousInvalidation(); | 65 void EnsureContinuousInvalidation(); |
64 bool DrawSWInternal(jobject java_canvas, | 66 bool DrawSWInternal(jobject java_canvas, |
65 const gfx::Rect& clip_bounds); | 67 const gfx::Rect& clip_bounds); |
66 bool RenderSW(SkCanvas* canvas); | 68 bool RenderSW(SkCanvas* canvas); |
67 bool CompositeSW(SkCanvas* canvas); | 69 bool CompositeSW(SkCanvas* canvas); |
(...skipping 18 matching lines...) Expand all Loading... |
86 bool hardware_initialized_; | 88 bool hardware_initialized_; |
87 bool hardware_failed_; | 89 bool hardware_failed_; |
88 | 90 |
89 // Used only for detecting Android View System context changes. | 91 // Used only for detecting Android View System context changes. |
90 // Not to be used between draw calls. | 92 // Not to be used between draw calls. |
91 EGLContext egl_context_at_init_; | 93 EGLContext egl_context_at_init_; |
92 | 94 |
93 // Last View scroll before hardware rendering is triggered. | 95 // Last View scroll before hardware rendering is triggered. |
94 gfx::Point hw_rendering_scroll_; | 96 gfx::Point hw_rendering_scroll_; |
95 | 97 |
| 98 // TODO(mkosiba): Plumb through to Java |
| 99 gfx::Vector2dF root_layer_scroll_offset_; |
| 100 |
96 base::WeakPtrFactory<InProcessViewRenderer> weak_factory_; | 101 base::WeakPtrFactory<InProcessViewRenderer> weak_factory_; |
97 | 102 |
98 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); | 103 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); |
99 }; | 104 }; |
100 | 105 |
101 } // namespace android_webview | 106 } // namespace android_webview |
102 | 107 |
103 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ | 108 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ |
OLD | NEW |