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

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

Issue 1082393003: TrimMemory strategy while offscreenPreRaster is on. (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: tiny bug Created 5 years, 8 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
OLDNEW
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_BROWSER_VIEW_RENDERER_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ 6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_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 "android_webview/browser/shared_renderer_state.h" 9 #include "android_webview/browser/shared_renderer_state.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 bool OnDrawHardware(); 59 bool OnDrawHardware();
60 bool OnDrawSoftware(SkCanvas* canvas); 60 bool OnDrawSoftware(SkCanvas* canvas);
61 61
62 // CapturePicture API methods. 62 // CapturePicture API methods.
63 skia::RefPtr<SkPicture> CapturePicture(int width, int height); 63 skia::RefPtr<SkPicture> CapturePicture(int width, int height);
64 void EnableOnNewPicture(bool enabled); 64 void EnableOnNewPicture(bool enabled);
65 65
66 void ClearView(); 66 void ClearView();
67 67
68 void SetOffscreenPreRaster(bool enabled); 68 void SetOffscreenPreRaster(bool enabled);
69 bool offscreen_pre_raster() const { return offscreen_pre_raster_; }
boliu 2015/04/16 01:58:39 not needed anymore
hush (inactive) 2015/04/16 04:08:27 Done.
69 70
70 // View update notifications. 71 // View update notifications.
71 void SetIsPaused(bool paused); 72 void SetIsPaused(bool paused);
72 void SetViewVisibility(bool visible); 73 void SetViewVisibility(bool visible);
73 void SetWindowVisibility(bool visible); 74 void SetWindowVisibility(bool visible);
74 void OnSizeChanged(int width, int height); 75 void OnSizeChanged(int width, int height);
75 void OnAttachedToWindow(int width, int height); 76 void OnAttachedToWindow(int width, int height);
76 void OnDetachedFromWindow(); 77 void OnDetachedFromWindow();
77 78
78 // Sets the scale for logical<->physical pixel conversions. 79 // Sets the scale for logical<->physical pixel conversions.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 void PostFallbackTick(); 139 void PostFallbackTick();
139 void FallbackTickFired(); 140 void FallbackTickFired();
140 141
141 // Force invoke the compositor to run produce a 1x1 software frame that is 142 // Force invoke the compositor to run produce a 1x1 software frame that is
142 // immediately discarded. This is a hack to force invoke parts of the 143 // immediately discarded. This is a hack to force invoke parts of the
143 // compositor that are not directly exposed here. 144 // compositor that are not directly exposed here.
144 void ForceFakeCompositeSW(); 145 void ForceFakeCompositeSW();
145 146
146 gfx::Vector2d max_scroll_offset() const; 147 gfx::Vector2d max_scroll_offset() const;
147 148
148 size_t CalculateDesiredMemoryPolicy(); 149 void UpdateMemoryPolicy();
149 150
150 // For debug tracing or logging. Return the string representation of this 151 // For debug tracing or logging. Return the string representation of this
151 // view renderer's state. 152 // view renderer's state.
152 std::string ToString() const; 153 std::string ToString() const;
153 154
154 BrowserViewRendererClient* client_; 155 BrowserViewRendererClient* client_;
155 SharedRendererState shared_renderer_state_; 156 SharedRendererState shared_renderer_state_;
156 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; 157 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
157 158
158 content::SynchronousCompositor* compositor_; 159 content::SynchronousCompositor* compositor_;
(...skipping 29 matching lines...) Expand all
188 // visible skew (especially noticeable when scrolling up and down in the same 189 // visible skew (especially noticeable when scrolling up and down in the same
189 // spot over a period of time). 190 // spot over a period of time).
190 gfx::Vector2dF overscroll_rounding_error_; 191 gfx::Vector2dF overscroll_rounding_error_;
191 192
192 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); 193 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer);
193 }; 194 };
194 195
195 } // namespace android_webview 196 } // namespace android_webview
196 197
197 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ 198 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/browser_view_renderer.cc » ('j') | android_webview/browser/browser_view_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698