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

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

Issue 1985483002: [Merge M51] aw: Avoid livelock bouncing between zero and non-zero memory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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
« no previous file with comments | « android_webview/browser/browser_view_renderer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "android_webview/browser/browser_view_renderer.h" 5 #include "android_webview/browser/browser_view_renderer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "android_webview/browser/browser_view_renderer_client.h" 9 #include "android_webview/browser/browser_view_renderer_client.h"
10 #include "android_webview/browser/child_frame.h" 10 #include "android_webview/browser/child_frame.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 content::SynchronousCompositor::Frame frame = 224 content::SynchronousCompositor::Frame frame =
225 compositor_->DemandDrawHw(surface_size, 225 compositor_->DemandDrawHw(surface_size,
226 gfx::Transform(), 226 gfx::Transform(),
227 viewport, 227 viewport,
228 clip, 228 clip,
229 viewport_rect_for_tile_priority, 229 viewport_rect_for_tile_priority,
230 transform_for_tile_priority); 230 transform_for_tile_priority);
231 if (!frame.frame.get()) { 231 if (!frame.frame.get()) {
232 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame", 232 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame",
233 TRACE_EVENT_SCOPE_THREAD); 233 TRACE_EVENT_SCOPE_THREAD);
234 hardware_enabled_ = render_thread_manager_->HasFrameOnUI(); 234 return render_thread_manager_->HasFrameOnUI();
235 if (!hardware_enabled_)
236 UpdateMemoryPolicy();
237 return hardware_enabled_;
238 } 235 }
239 236
240 std::unique_ptr<ChildFrame> child_frame = base::WrapUnique(new ChildFrame( 237 std::unique_ptr<ChildFrame> child_frame = base::WrapUnique(new ChildFrame(
241 frame.output_surface_id, std::move(frame.frame), 238 frame.output_surface_id, std::move(frame.frame),
242 GetCompositorID(compositor_), viewport_rect_for_tile_priority.IsEmpty(), 239 GetCompositorID(compositor_), viewport_rect_for_tile_priority.IsEmpty(),
243 transform_for_tile_priority, offscreen_pre_raster_, 240 transform_for_tile_priority, offscreen_pre_raster_,
244 external_draw_constraints_.is_layer)); 241 external_draw_constraints_.is_layer));
245 242
246 ReturnUnusedResource(render_thread_manager_->PassUncommittedFrameOnUI()); 243 ReturnUnusedResource(render_thread_manager_->PassUncommittedFrameOnUI());
247 render_thread_manager_->SetFrameOnUI(std::move(child_frame)); 244 render_thread_manager_->SetFrameOnUI(std::move(child_frame));
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 base::StringAppendF(&str, 699 base::StringAppendF(&str,
703 "overscroll_rounding_error_: %s ", 700 "overscroll_rounding_error_: %s ",
704 overscroll_rounding_error_.ToString().c_str()); 701 overscroll_rounding_error_.ToString().c_str());
705 base::StringAppendF( 702 base::StringAppendF(
706 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); 703 &str, "on_new_picture_enable: %d ", on_new_picture_enable_);
707 base::StringAppendF(&str, "clear_view: %d ", clear_view_); 704 base::StringAppendF(&str, "clear_view: %d ", clear_view_);
708 return str; 705 return str;
709 } 706 }
710 707
711 } // namespace android_webview 708 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/browser_view_renderer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698