Chromium Code Reviews| OLD | NEW |
|---|---|
| 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.h" | 8 #include "android_webview/browser/browser_view_renderer.h" |
| 9 | 9 |
| 10 #include "base/cancelable_callback.h" | |
| 10 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 11 #include "content/public/browser/android/synchronous_compositor_client.h" | 12 #include "content/public/browser/android/synchronous_compositor_client.h" |
| 12 #include "ui/gfx/vector2d_f.h" | 13 #include "ui/gfx/vector2d_f.h" |
| 13 | 14 |
| 14 namespace content { | 15 namespace content { |
| 15 class SynchronousCompositor; | 16 class SynchronousCompositor; |
| 16 class WebContents; | 17 class WebContents; |
| 17 } | 18 } |
| 18 | 19 |
| 19 typedef void* EGLContext; | 20 typedef void* EGLContext; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 | 65 |
| 65 void WebContentsGone(); | 66 void WebContentsGone(); |
| 66 | 67 |
| 67 private: | 68 private: |
| 68 void EnsureContinuousInvalidation(AwDrawGLInfo* draw_info); | 69 void EnsureContinuousInvalidation(AwDrawGLInfo* draw_info); |
| 69 bool DrawSWInternal(jobject java_canvas, | 70 bool DrawSWInternal(jobject java_canvas, |
| 70 const gfx::Rect& clip_bounds); | 71 const gfx::Rect& clip_bounds); |
| 71 bool RenderSW(SkCanvas* canvas); | 72 bool RenderSW(SkCanvas* canvas); |
| 72 bool CompositeSW(SkCanvas* canvas); | 73 bool CompositeSW(SkCanvas* canvas); |
| 73 | 74 |
| 75 // If we call up view invalidate and OnDraw is not called before a deadline, | |
| 76 // then we keep ticking the SynchronousCompositor so it can make progress. | |
| 77 void FallbackTick(); | |
| 78 base::CancelableClosure fallback_tick_; | |
|
joth
2013/06/21 20:22:01
put a \n between functions and data members
boliu
2013/06/21 21:49:41
Grouped together with the rest of invalidate insta
| |
| 79 | |
| 74 BrowserViewRenderer::Client* client_; | 80 BrowserViewRenderer::Client* client_; |
| 75 BrowserViewRenderer::JavaHelper* java_helper_; | 81 BrowserViewRenderer::JavaHelper* java_helper_; |
| 76 content::WebContents* web_contents_; | 82 content::WebContents* web_contents_; |
| 77 content::SynchronousCompositor* compositor_; | 83 content::SynchronousCompositor* compositor_; |
| 78 | 84 |
| 79 bool visible_; | 85 bool visible_; |
| 80 float dip_scale_; | 86 float dip_scale_; |
| 81 | 87 |
| 82 // When true, we should continuously invalidate and keep drawing, for example | 88 // When true, we should continuously invalidate and keep drawing, for example |
| 83 // to drive animation. | 89 // to drive animation. |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 103 | 109 |
| 104 // Current scroll offset in CSS pixels. | 110 // Current scroll offset in CSS pixels. |
| 105 gfx::Vector2dF scroll_offset_css_; | 111 gfx::Vector2dF scroll_offset_css_; |
| 106 | 112 |
| 107 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); | 113 DISALLOW_COPY_AND_ASSIGN(InProcessViewRenderer); |
| 108 }; | 114 }; |
| 109 | 115 |
| 110 } // namespace android_webview | 116 } // namespace android_webview |
| 111 | 117 |
| 112 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ | 118 #endif // ANDROID_WEBVIEW_BROWSER_IN_PROCESS_IN_PROCESS_VIEW_RENDERER_H_ |
| OLD | NEW |