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

Unified Diff: cc/test/pixel_test_delegating_output_surface.cc

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Dana's nits Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/pixel_test_delegating_output_surface.h ('k') | cc/test/pixel_test_output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/pixel_test_delegating_output_surface.cc
diff --git a/cc/test/pixel_test_delegating_output_surface.cc b/cc/test/pixel_test_delegating_output_surface.cc
index d38b19c0de604b1fe89da130a98ff9619cd776d1..dd57248ce2b086120d389c467a6278f6c2471079 100644
--- a/cc/test/pixel_test_delegating_output_surface.cc
+++ b/cc/test/pixel_test_delegating_output_surface.cc
@@ -120,7 +120,7 @@ void PixelTestDelegatingOutputSurface::DetachFromClient() {
OutputSurface::DetachFromClient();
}
-void PixelTestDelegatingOutputSurface::SwapBuffers(CompositorFrame* frame) {
+void PixelTestDelegatingOutputSurface::SwapBuffers(CompositorFrame frame) {
client_->DidSwapBuffers();
if (delegated_surface_id_.is_null()) {
@@ -128,16 +128,16 @@ void PixelTestDelegatingOutputSurface::SwapBuffers(CompositorFrame* frame) {
surface_factory_->Create(delegated_surface_id_);
}
display_->SetSurfaceId(delegated_surface_id_,
- frame->metadata.device_scale_factor);
+ frame.metadata.device_scale_factor);
gfx::Size frame_size =
- frame->delegated_frame_data->render_pass_list.back()->output_rect.size();
+ frame.delegated_frame_data->render_pass_list.back()->output_rect.size();
display_->Resize(frame_size);
- std::unique_ptr<CompositorFrame> my_frame(new CompositorFrame);
- frame->AssignTo(my_frame.get());
+ std::unique_ptr<CompositorFrame> frame_copy(new CompositorFrame);
+ *frame_copy = std::move(frame);
surface_factory_->SubmitCompositorFrame(
- delegated_surface_id_, std::move(my_frame),
+ delegated_surface_id_, std::move(frame_copy),
base::Bind(&PixelTestDelegatingOutputSurface::DrawCallback,
weak_ptrs_.GetWeakPtr()));
« no previous file with comments | « cc/test/pixel_test_delegating_output_surface.h ('k') | cc/test/pixel_test_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698