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

Side by Side Diff: cc/test/fake_output_surface.cc

Issue 2143263002: cc: Remove OutputSurfaceClient::DidSwapBuffers(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removedidswap: fix-webview-swap Created 4 years, 5 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 | « cc/test/fake_layer_tree_host_impl_client.h ('k') | cc/test/fake_output_surface_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/test/fake_output_surface.h" 5 #include "cc/test/fake_output_surface.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "cc/output/compositor_frame_ack.h" 9 #include "cc/output/compositor_frame_ack.h"
10 #include "cc/output/output_surface_client.h" 10 #include "cc/output/output_surface_client.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 last_sent_frame_->delegated_frame_data->resource_list.end()); 57 last_sent_frame_->delegated_frame_data->resource_list.end());
58 } 58 }
59 59
60 ++num_sent_frames_; 60 ++num_sent_frames_;
61 } else { 61 } else {
62 last_swap_rect_ = frame_copy->gl_frame_data->sub_buffer_rect; 62 last_swap_rect_ = frame_copy->gl_frame_data->sub_buffer_rect;
63 last_sent_frame_ = std::move(frame_copy); 63 last_sent_frame_ = std::move(frame_copy);
64 ++num_sent_frames_; 64 ++num_sent_frames_;
65 } 65 }
66 PostSwapBuffersComplete(); 66 PostSwapBuffersComplete();
67 client_->DidSwapBuffers();
68 } 67 }
69 68
70 void FakeOutputSurface::BindFramebuffer() { 69 void FakeOutputSurface::BindFramebuffer() {
71 if (framebuffer_) { 70 if (framebuffer_) {
72 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 71 context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER,
73 framebuffer_); 72 framebuffer_);
74 } else { 73 } else {
75 OutputSurface::BindFramebuffer(); 74 OutputSurface::BindFramebuffer();
76 } 75 }
77 } 76 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 const { 126 const {
128 return overlay_candidate_validator_; 127 return overlay_candidate_validator_;
129 } 128 }
130 129
131 void FakeOutputSurface::SetMemoryPolicyToSetAtBind( 130 void FakeOutputSurface::SetMemoryPolicyToSetAtBind(
132 std::unique_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) { 131 std::unique_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) {
133 memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind); 132 memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind);
134 } 133 }
135 134
136 } // namespace cc 135 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl_client.h ('k') | cc/test/fake_output_surface_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698