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

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

Issue 2238693002: Plumb SetVisible from ui::Compositor to the DirectRenderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: setvisible-browser: onemore Created 4 years, 4 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/pixel_test.cc ('k') | content/browser/compositor/gpu_process_transport_factory.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/test_delegating_output_surface.h" 5 #include "cc/test/test_delegating_output_surface.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "cc/output/begin_frame_args.h" 10 #include "cc/output/begin_frame_args.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // false), we should not be listening for lost context callbacks on the 85 // false), we should not be listening for lost context callbacks on the
86 // context here. 86 // context here.
87 if (!capabilities_.delegated_sync_points_required && context_provider()) 87 if (!capabilities_.delegated_sync_points_required && context_provider())
88 context_provider()->SetLostContextCallback(base::Closure()); 88 context_provider()->SetLostContextCallback(base::Closure());
89 89
90 surface_manager_->RegisterSurfaceClientId(surface_id_allocator_->client_id()); 90 surface_manager_->RegisterSurfaceClientId(surface_id_allocator_->client_id());
91 surface_manager_->RegisterSurfaceFactoryClient( 91 surface_manager_->RegisterSurfaceFactoryClient(
92 surface_id_allocator_->client_id(), this); 92 surface_id_allocator_->client_id(), this);
93 display_->Initialize(this, surface_manager_.get(), 93 display_->Initialize(this, surface_manager_.get(),
94 surface_id_allocator_->client_id()); 94 surface_id_allocator_->client_id());
95 display_->SetVisible(true);
95 bound_ = true; 96 bound_ = true;
96 return true; 97 return true;
97 } 98 }
98 99
99 void TestDelegatingOutputSurface::DetachFromClient() { 100 void TestDelegatingOutputSurface::DetachFromClient() {
100 // Some tests make BindToClient fail on purpose. ^__^ 101 // Some tests make BindToClient fail on purpose. ^__^
101 if (bound_) { 102 if (bound_) {
102 if (!delegated_surface_id_.is_null()) 103 if (!delegated_surface_id_.is_null())
103 surface_factory_->Destroy(delegated_surface_id_); 104 surface_factory_->Destroy(delegated_surface_id_);
104 surface_manager_->UnregisterSurfaceFactoryClient( 105 surface_manager_->UnregisterSurfaceFactoryClient(
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if (test_client_) 205 if (test_client_)
205 test_client_->DisplayWillDrawAndSwap(will_draw_and_swap, render_passes); 206 test_client_->DisplayWillDrawAndSwap(will_draw_and_swap, render_passes);
206 } 207 }
207 208
208 void TestDelegatingOutputSurface::DisplayDidDrawAndSwap() { 209 void TestDelegatingOutputSurface::DisplayDidDrawAndSwap() {
209 if (test_client_) 210 if (test_client_)
210 test_client_->DisplayDidDrawAndSwap(); 211 test_client_->DisplayDidDrawAndSwap();
211 } 212 }
212 213
213 } // namespace cc 214 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/pixel_test.cc ('k') | content/browser/compositor/gpu_process_transport_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698