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

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

Issue 609663003: cc: Remove use of PassAs() and constructor-casting with scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cc-passas: PassAs-presubmit-warning Created 6 years, 2 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_client.cc ('k') | cc/test/fake_picture_layer.cc » ('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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void FakeOutputSurface::OnBeginFrame() { 98 void FakeOutputSurface::OnBeginFrame() {
99 client_->BeginFrame(CreateBeginFrameArgsForTesting()); 99 client_->BeginFrame(CreateBeginFrameArgsForTesting());
100 } 100 }
101 101
102 102
103 bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) { 103 bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) {
104 if (OutputSurface::BindToClient(client)) { 104 if (OutputSurface::BindToClient(client)) {
105 client_ = client; 105 client_ = client;
106 if (memory_policy_to_set_at_bind_) { 106 if (memory_policy_to_set_at_bind_) {
107 client_->SetMemoryPolicy(*memory_policy_to_set_at_bind_.get()); 107 client_->SetMemoryPolicy(*memory_policy_to_set_at_bind_.get());
108 memory_policy_to_set_at_bind_.reset(); 108 memory_policy_to_set_at_bind_ = nullptr;
109 } 109 }
110 return true; 110 return true;
111 } else { 111 } else {
112 return false; 112 return false;
113 } 113 }
114 } 114 }
115 115
116 void FakeOutputSurface::SetTreeActivationCallback( 116 void FakeOutputSurface::SetTreeActivationCallback(
117 const base::Closure& callback) { 117 const base::Closure& callback) {
118 DCHECK(client_); 118 DCHECK(client_);
(...skipping 16 matching lines...) Expand all
135 bool FakeOutputSurface::HasExternalStencilTest() const { 135 bool FakeOutputSurface::HasExternalStencilTest() const {
136 return has_external_stencil_test_; 136 return has_external_stencil_test_;
137 } 137 }
138 138
139 void FakeOutputSurface::SetMemoryPolicyToSetAtBind( 139 void FakeOutputSurface::SetMemoryPolicyToSetAtBind(
140 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) { 140 scoped_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind) {
141 memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind); 141 memory_policy_to_set_at_bind_.swap(memory_policy_to_set_at_bind);
142 } 142 }
143 143
144 } // namespace cc 144 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_client.cc ('k') | cc/test/fake_picture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698