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

Side by Side Diff: cc/surfaces/surface_display_output_surface.cc

Issue 1455023002: cc: Replace Pass() with std::move() in some subdirs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-cc
Patch Set: pass-cc2: . Created 5 years, 1 month 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 "cc/surfaces/surface_display_output_surface.h" 5 #include "cc/surfaces/surface_display_output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "cc/output/compositor_frame.h" 8 #include "cc/output/compositor_frame.h"
9 #include "cc/output/compositor_frame_ack.h" 9 #include "cc/output/compositor_frame_ack.h"
10 #include "cc/surfaces/display.h" 10 #include "cc/surfaces/display.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 display_size_ = frame_size; 57 display_size_ = frame_size;
58 } 58 }
59 display_client_->display()->SetSurfaceId(surface_id_, 59 display_client_->display()->SetSurfaceId(surface_id_,
60 frame->metadata.device_scale_factor); 60 frame->metadata.device_scale_factor);
61 61
62 client_->DidSwapBuffers(); 62 client_->DidSwapBuffers();
63 63
64 scoped_ptr<CompositorFrame> frame_copy(new CompositorFrame()); 64 scoped_ptr<CompositorFrame> frame_copy(new CompositorFrame());
65 frame->AssignTo(frame_copy.get()); 65 frame->AssignTo(frame_copy.get());
66 factory_.SubmitCompositorFrame( 66 factory_.SubmitCompositorFrame(
67 surface_id_, frame_copy.Pass(), 67 surface_id_, std::move(frame_copy),
68 base::Bind(&SurfaceDisplayOutputSurface::SwapBuffersComplete, 68 base::Bind(&SurfaceDisplayOutputSurface::SwapBuffersComplete,
69 base::Unretained(this))); 69 base::Unretained(this)));
70 } 70 }
71 71
72 bool SurfaceDisplayOutputSurface::BindToClient(OutputSurfaceClient* client) { 72 bool SurfaceDisplayOutputSurface::BindToClient(OutputSurfaceClient* client) {
73 DCHECK(client); 73 DCHECK(client);
74 DCHECK(display_client_); 74 DCHECK(display_client_);
75 client_ = client; 75 client_ = client;
76 // Avoid initializing GL context here, as this should be sharing the 76 // Avoid initializing GL context here, as this should be sharing the
77 // Display's context. 77 // Display's context.
(...skipping 19 matching lines...) Expand all
97 BeginFrameSource* begin_frame_source) { 97 BeginFrameSource* begin_frame_source) {
98 // TODO(tansell): Hook this up. 98 // TODO(tansell): Hook this up.
99 } 99 }
100 100
101 void SurfaceDisplayOutputSurface::SwapBuffersComplete(SurfaceDrawStatus drawn) { 101 void SurfaceDisplayOutputSurface::SwapBuffersComplete(SurfaceDrawStatus drawn) {
102 if (client_ && !display_client_->output_surface_lost()) 102 if (client_ && !display_client_->output_surface_lost())
103 client_->DidSwapBuffersComplete(); 103 client_->DidSwapBuffersComplete();
104 } 104 }
105 105
106 } // namespace cc 106 } // namespace cc
OLDNEW
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | cc/surfaces/surface_display_output_surface_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698