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

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

Issue 1975273003: aw: Avoid livelock bouncing between zero and non-zero memory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert fix 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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 content::SynchronousCompositor::Frame frame = 237 content::SynchronousCompositor::Frame frame =
238 compositor_->DemandDrawHw(surface_size, 238 compositor_->DemandDrawHw(surface_size,
239 gfx::Transform(), 239 gfx::Transform(),
240 viewport, 240 viewport,
241 clip, 241 clip,
242 viewport_rect_for_tile_priority, 242 viewport_rect_for_tile_priority,
243 transform_for_tile_priority); 243 transform_for_tile_priority);
244 if (!frame.frame.get()) { 244 if (!frame.frame.get()) {
245 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame", 245 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame",
246 TRACE_EVENT_SCOPE_THREAD); 246 TRACE_EVENT_SCOPE_THREAD);
247 hardware_enabled_ = compositor_frame_consumer_->HasFrameOnUI(); 247 return compositor_frame_consumer_->HasFrameOnUI();
248 if (!hardware_enabled_)
249 UpdateMemoryPolicy();
250 return hardware_enabled_;
251 } 248 }
252 249
253 std::unique_ptr<ChildFrame> child_frame = base::WrapUnique(new ChildFrame( 250 std::unique_ptr<ChildFrame> child_frame = base::WrapUnique(new ChildFrame(
254 frame.output_surface_id, std::move(frame.frame), 251 frame.output_surface_id, std::move(frame.frame),
255 GetCompositorID(compositor_), viewport_rect_for_tile_priority.IsEmpty(), 252 GetCompositorID(compositor_), viewport_rect_for_tile_priority.IsEmpty(),
256 transform_for_tile_priority, offscreen_pre_raster_, 253 transform_for_tile_priority, offscreen_pre_raster_,
257 external_draw_constraints_.is_layer)); 254 external_draw_constraints_.is_layer));
258 255
259 ReturnUnusedResource(compositor_frame_consumer_->PassUncommittedFrameOnUI()); 256 ReturnUnusedResource(compositor_frame_consumer_->PassUncommittedFrameOnUI());
260 compositor_frame_consumer_->SetFrameOnUI(std::move(child_frame)); 257 compositor_frame_consumer_->SetFrameOnUI(std::move(child_frame));
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 base::StringAppendF(&str, 717 base::StringAppendF(&str,
721 "overscroll_rounding_error_: %s ", 718 "overscroll_rounding_error_: %s ",
722 overscroll_rounding_error_.ToString().c_str()); 719 overscroll_rounding_error_.ToString().c_str());
723 base::StringAppendF( 720 base::StringAppendF(
724 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); 721 &str, "on_new_picture_enable: %d ", on_new_picture_enable_);
725 base::StringAppendF(&str, "clear_view: %d ", clear_view_); 722 base::StringAppendF(&str, "clear_view: %d ", clear_view_);
726 return str; 723 return str;
727 } 724 }
728 725
729 } // namespace android_webview 726 } // 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