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

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

Issue 1832423004: aw: Ensure functor is called after binding init (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: memory policy Created 4 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
« no previous file with comments | « no previous file | 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 content::SynchronousCompositor::Frame frame = 253 content::SynchronousCompositor::Frame frame =
254 compositor_->DemandDrawHw(surface_size, 254 compositor_->DemandDrawHw(surface_size,
255 gfx::Transform(), 255 gfx::Transform(),
256 viewport, 256 viewport,
257 clip, 257 clip,
258 viewport_rect_for_tile_priority, 258 viewport_rect_for_tile_priority,
259 transform_for_tile_priority); 259 transform_for_tile_priority);
260 if (!frame.frame.get()) { 260 if (!frame.frame.get()) {
261 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame", 261 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame",
262 TRACE_EVENT_SCOPE_THREAD); 262 TRACE_EVENT_SCOPE_THREAD);
263 return shared_renderer_state_.HasFrameOnUI(); 263 hardware_enabled_ = shared_renderer_state_.HasFrameOnUI();
264 if (!hardware_enabled_)
265 UpdateMemoryPolicy();
266 return hardware_enabled_;
264 } 267 }
265 268
266 scoped_ptr<ChildFrame> child_frame = make_scoped_ptr(new ChildFrame( 269 scoped_ptr<ChildFrame> child_frame = make_scoped_ptr(new ChildFrame(
267 frame.output_surface_id, std::move(frame.frame), 270 frame.output_surface_id, std::move(frame.frame),
268 GetCompositorID(compositor_), viewport_rect_for_tile_priority.IsEmpty(), 271 GetCompositorID(compositor_), viewport_rect_for_tile_priority.IsEmpty(),
269 transform_for_tile_priority, offscreen_pre_raster_, 272 transform_for_tile_priority, offscreen_pre_raster_,
270 parent_draw_constraints.is_layer)); 273 parent_draw_constraints.is_layer));
271 274
272 ReturnUnusedResource(shared_renderer_state_.PassUncommittedFrameOnUI()); 275 ReturnUnusedResource(shared_renderer_state_.PassUncommittedFrameOnUI());
273 shared_renderer_state_.SetCompositorFrameOnUI(std::move(child_frame)); 276 shared_renderer_state_.SetCompositorFrameOnUI(std::move(child_frame));
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 base::StringAppendF(&str, 729 base::StringAppendF(&str,
727 "overscroll_rounding_error_: %s ", 730 "overscroll_rounding_error_: %s ",
728 overscroll_rounding_error_.ToString().c_str()); 731 overscroll_rounding_error_.ToString().c_str());
729 base::StringAppendF( 732 base::StringAppendF(
730 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); 733 &str, "on_new_picture_enable: %d ", on_new_picture_enable_);
731 base::StringAppendF(&str, "clear_view: %d ", clear_view_); 734 base::StringAppendF(&str, "clear_view: %d ", clear_view_);
732 return str; 735 return str;
733 } 736 }
734 737
735 } // namespace android_webview 738 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698