Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: android_webview/browser/in_process_view_renderer.h

Issue 15002007: Delegate root layer scroll offset to android_webview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on top of Jared's CL Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 virtual bool IsAttachedToWindow() OVERRIDE; 46 virtual bool IsAttachedToWindow() OVERRIDE;
47 virtual bool IsViewVisible() OVERRIDE; 47 virtual bool IsViewVisible() OVERRIDE;
48 virtual gfx::Rect GetScreenRect() OVERRIDE; 48 virtual gfx::Rect GetScreenRect() OVERRIDE;
49 49
50 // SynchronousCompositorClient overrides 50 // SynchronousCompositorClient overrides
51 virtual void DidInitializeCompositor( 51 virtual void DidInitializeCompositor(
52 content::SynchronousCompositor* compositor) OVERRIDE; 52 content::SynchronousCompositor* compositor) OVERRIDE;
53 virtual void DidDestroyCompositor( 53 virtual void DidDestroyCompositor(
54 content::SynchronousCompositor* compositor) OVERRIDE; 54 content::SynchronousCompositor* compositor) OVERRIDE;
55 virtual void SetContinuousInvalidate(bool invalidate) OVERRIDE; 55 virtual void SetContinuousInvalidate(bool invalidate) OVERRIDE;
56 virtual void SetTotalRootLayerScrollOffset(gfx::Vector2dF new_value) OVERRIDE;
57 virtual gfx::Vector2dF GetTotalRootLayerScrollOffset() OVERRIDE;
56 58
57 void WebContentsGone(); 59 void WebContentsGone();
58 60
59 private: 61 private:
60 void Invalidate(); 62 void Invalidate();
61 void EnsureContinuousInvalidation(); 63 void EnsureContinuousInvalidation();
62 bool DrawSWInternal(jobject java_canvas, 64 bool DrawSWInternal(jobject java_canvas,
63 const gfx::Rect& clip_bounds); 65 const gfx::Rect& clip_bounds);
64 bool RenderSW(SkCanvas* canvas); 66 bool RenderSW(SkCanvas* canvas);
65 bool CompositeSW(SkCanvas* canvas); 67 bool CompositeSW(SkCanvas* canvas);
(...skipping 18 matching lines...) Expand all
84 bool hardware_initialized_; 86 bool hardware_initialized_;
85 bool hardware_failed_; 87 bool hardware_failed_;
86 88
87 // Used only for detecting Android View System context changes. 89 // Used only for detecting Android View System context changes.
88 // Not to be used between draw calls. 90 // Not to be used between draw calls.
89 EGLContext egl_context_at_init_; 91 EGLContext egl_context_at_init_;
90 92
91 // Last View scroll before hardware rendering is triggered. 93 // Last View scroll before hardware rendering is triggered.
92 gfx::Point hw_rendering_scroll_; 94 gfx::Point hw_rendering_scroll_;
93 95
96 // TODO(mkosiba): Plumb through to Java
97 gfx::Vector2dF root_layer_scroll_offset_;
joth 2013/06/06 20:19:32 I'm tempted to name this next_frame_scroll_offet_
mkosiba (inactive) 2013/06/07 16:18:27 Calling it next_frame_scroll_offset_ would be a bi
98
94 base::WeakPtrFactory<InProcessViewRenderer> weak_factory_; 99 base::WeakPtrFactory<InProcessViewRenderer> weak_factory_;
95 100
96 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); 101 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer);
97 }; 102 };
98 103
99 } // namespace android_webview 104 } // namespace android_webview
100 105
101 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ 106 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698