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

Side by Side Diff: ui/compositor/test/in_process_context_factory.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 | « services/ui/surfaces/direct_output_surface_ozone.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/compositor/test/in_process_context_factory.h" 5 #include "ui/compositor/test/in_process_context_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL(); 78 gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL();
79 const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM(); 79 const uint64_t fence_sync = gl->InsertFenceSyncCHROMIUM();
80 gl->ShallowFlushCHROMIUM(); 80 gl->ShallowFlushCHROMIUM();
81 81
82 gpu::SyncToken sync_token; 82 gpu::SyncToken sync_token;
83 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, sync_token.GetData()); 83 gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, sync_token.GetData());
84 84
85 context_provider_->ContextSupport()->SignalSyncToken( 85 context_provider_->ContextSupport()->SignalSyncToken(
86 sync_token, base::Bind(&OutputSurface::OnSwapBuffersComplete, 86 sync_token, base::Bind(&OutputSurface::OnSwapBuffersComplete,
87 weak_ptr_factory_.GetWeakPtr())); 87 weak_ptr_factory_.GetWeakPtr()));
88 client_->DidSwapBuffers();
89 } 88 }
90 uint32_t GetFramebufferCopyTextureFormat() override { 89 uint32_t GetFramebufferCopyTextureFormat() override {
91 auto* gl = static_cast<InProcessContextProvider*>(context_provider()); 90 auto* gl = static_cast<InProcessContextProvider*>(context_provider());
92 return gl->GetCopyTextureInternalFormat(); 91 return gl->GetCopyTextureInternalFormat();
93 } 92 }
94 93
95 private: 94 private:
96 base::WeakPtrFactory<DirectOutputSurface> weak_ptr_factory_; 95 base::WeakPtrFactory<DirectOutputSurface> weak_ptr_factory_;
97 96
98 DISALLOW_COPY_AND_ASSIGN(DirectOutputSurface); 97 DISALLOW_COPY_AND_ASSIGN(DirectOutputSurface);
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 270
272 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) { 271 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) {
273 observer_list_.AddObserver(observer); 272 observer_list_.AddObserver(observer);
274 } 273 }
275 274
276 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) { 275 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) {
277 observer_list_.RemoveObserver(observer); 276 observer_list_.RemoveObserver(observer);
278 } 277 }
279 278
280 } // namespace ui 279 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/surfaces/direct_output_surface_ozone.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698