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

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

Issue 2258823002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 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 } 237 }
238 238
239 content::SynchronousCompositor::Frame frame = compositor_->DemandDrawHw( 239 content::SynchronousCompositor::Frame frame = compositor_->DemandDrawHw(
240 size_, viewport_rect_for_tile_priority, transform_for_tile_priority); 240 size_, viewport_rect_for_tile_priority, transform_for_tile_priority);
241 if (!frame.frame.get()) { 241 if (!frame.frame.get()) {
242 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame", 242 TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame",
243 TRACE_EVENT_SCOPE_THREAD); 243 TRACE_EVENT_SCOPE_THREAD);
244 return current_compositor_frame_consumer_->HasFrameOnUI(); 244 return current_compositor_frame_consumer_->HasFrameOnUI();
245 } 245 }
246 246
247 std::unique_ptr<ChildFrame> child_frame = base::WrapUnique(new ChildFrame( 247 std::unique_ptr<ChildFrame> child_frame = base::MakeUnique<ChildFrame>(
248 frame.output_surface_id, std::move(frame.frame), compositor_id_, 248 frame.output_surface_id, std::move(frame.frame), compositor_id_,
249 viewport_rect_for_tile_priority.IsEmpty(), transform_for_tile_priority, 249 viewport_rect_for_tile_priority.IsEmpty(), transform_for_tile_priority,
250 offscreen_pre_raster_, external_draw_constraints_.is_layer)); 250 offscreen_pre_raster_, external_draw_constraints_.is_layer);
251 251
252 ReturnUnusedResource( 252 ReturnUnusedResource(
253 current_compositor_frame_consumer_->PassUncommittedFrameOnUI()); 253 current_compositor_frame_consumer_->PassUncommittedFrameOnUI());
254 current_compositor_frame_consumer_->SetFrameOnUI(std::move(child_frame)); 254 current_compositor_frame_consumer_->SetFrameOnUI(std::move(child_frame));
255 return true; 255 return true;
256 } 256 }
257 257
258 void BrowserViewRenderer::OnParentDrawConstraintsUpdated( 258 void BrowserViewRenderer::OnParentDrawConstraintsUpdated(
259 CompositorFrameConsumer* compositor_frame_consumer) { 259 CompositorFrameConsumer* compositor_frame_consumer) {
260 DCHECK(compositor_frame_consumer); 260 DCHECK(compositor_frame_consumer);
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 base::StringAppendF(&str, 732 base::StringAppendF(&str,
733 "overscroll_rounding_error_: %s ", 733 "overscroll_rounding_error_: %s ",
734 overscroll_rounding_error_.ToString().c_str()); 734 overscroll_rounding_error_.ToString().c_str());
735 base::StringAppendF( 735 base::StringAppendF(
736 &str, "on_new_picture_enable: %d ", on_new_picture_enable_); 736 &str, "on_new_picture_enable: %d ", on_new_picture_enable_);
737 base::StringAppendF(&str, "clear_view: %d ", clear_view_); 737 base::StringAppendF(&str, "clear_view: %d ", clear_view_);
738 return str; 738 return str;
739 } 739 }
740 740
741 } // namespace android_webview 741 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/aw_browser_policy_connector.cc ('k') | android_webview/browser/browser_view_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698