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

Side by Side Diff: content/public/test/test_synchronous_compositor_android.cc

Issue 1552733002: Convert Pass()→std::move() in //content (Android edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 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 "content/public/test/test_synchronous_compositor_android.h" 5 #include "content/public/test/test_synchronous_compositor_android.h"
6 6
7 #include <utility>
8
7 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
8 10
9 namespace content { 11 namespace content {
10 12
11 TestSynchronousCompositor::TestSynchronousCompositor() : client_(NULL) { 13 TestSynchronousCompositor::TestSynchronousCompositor() : client_(NULL) {
12 } 14 }
13 15
14 TestSynchronousCompositor::~TestSynchronousCompositor() { 16 TestSynchronousCompositor::~TestSynchronousCompositor() {
15 SetClient(NULL); 17 SetClient(NULL);
16 } 18 }
17 19
18 void TestSynchronousCompositor::SetClient(SynchronousCompositorClient* client) { 20 void TestSynchronousCompositor::SetClient(SynchronousCompositorClient* client) {
19 if (client_) 21 if (client_)
20 client_->DidDestroyCompositor(this); 22 client_->DidDestroyCompositor(this);
21 client_ = client; 23 client_ = client;
22 if (client_) { 24 if (client_) {
23 client_->DidInitializeCompositor(this); 25 client_->DidInitializeCompositor(this);
24 client_->DidBecomeCurrent(this); 26 client_->DidBecomeCurrent(this);
25 } 27 }
26 } 28 }
27 29
28 scoped_ptr<cc::CompositorFrame> TestSynchronousCompositor::DemandDrawHw( 30 scoped_ptr<cc::CompositorFrame> TestSynchronousCompositor::DemandDrawHw(
29 const gfx::Size& surface_size, 31 const gfx::Size& surface_size,
30 const gfx::Transform& transform, 32 const gfx::Transform& transform,
31 const gfx::Rect& viewport, 33 const gfx::Rect& viewport,
32 const gfx::Rect& clip, 34 const gfx::Rect& clip,
33 const gfx::Rect& viewport_rect_for_tile_priority, 35 const gfx::Rect& viewport_rect_for_tile_priority,
34 const gfx::Transform& transform_for_tile_priority) { 36 const gfx::Transform& transform_for_tile_priority) {
35 return hardware_frame_.Pass(); 37 return std::move(hardware_frame_);
36 } 38 }
37 39
38 bool TestSynchronousCompositor::DemandDrawSw(SkCanvas* canvas) { 40 bool TestSynchronousCompositor::DemandDrawSw(SkCanvas* canvas) {
39 DCHECK(canvas); 41 DCHECK(canvas);
40 return true; 42 return true;
41 } 43 }
42 44
43 void TestSynchronousCompositor::SetHardwareFrame( 45 void TestSynchronousCompositor::SetHardwareFrame(
44 scoped_ptr<cc::CompositorFrame> frame) { 46 scoped_ptr<cc::CompositorFrame> frame) {
45 hardware_frame_ = frame.Pass(); 47 hardware_frame_ = std::move(frame);
46 } 48 }
47 49
48 } // namespace content 50 } // namespace content
OLDNEW
« no previous file with comments | « content/common/android/gin_java_bridge_value.cc ('k') | content/renderer/java/gin_java_bridge_value_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698