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

Side by Side Diff: gpu/ipc/service/gpu_command_buffer_stub.cc

Issue 2414153005: Remove usage of FOR_EACH_OBSERVER macro in gpu (Closed)
Patch Set: Created 4 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 | « gpu/ipc/client/command_buffer_proxy_impl.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "gpu/ipc/service/gpu_command_buffer_stub.h" 5 #include "gpu/ipc/service/gpu_command_buffer_stub.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 executor_.reset(); 421 executor_.reset();
422 422
423 sync_point_client_.reset(); 423 sync_point_client_.reset();
424 424
425 bool have_context = false; 425 bool have_context = false;
426 if (decoder_ && decoder_->GetGLContext()) { 426 if (decoder_ && decoder_->GetGLContext()) {
427 // Try to make the context current regardless of whether it was lost, so we 427 // Try to make the context current regardless of whether it was lost, so we
428 // don't leak resources. 428 // don't leak resources.
429 have_context = decoder_->GetGLContext()->MakeCurrent(surface_.get()); 429 have_context = decoder_->GetGLContext()->MakeCurrent(surface_.get());
430 } 430 }
431 FOR_EACH_OBSERVER(DestructionObserver, 431 for (auto& observer : destruction_observers_)
432 destruction_observers_, 432 observer.OnWillDestroyStub();
433 OnWillDestroyStub());
434 433
435 if (decoder_) { 434 if (decoder_) {
436 decoder_->Destroy(have_context); 435 decoder_->Destroy(have_context);
437 decoder_.reset(); 436 decoder_.reset();
438 } 437 }
439 438
440 command_buffer_.reset(); 439 command_buffer_.reset();
441 440
442 // Remove this after crbug.com/248395 is sorted out. 441 // Remove this after crbug.com/248395 is sorted out.
443 surface_ = NULL; 442 surface_ = NULL;
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, params)); 1113 Send(new GpuCommandBufferMsg_SwapBuffersCompleted(route_id_, params));
1115 } 1114 }
1116 1115
1117 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase, 1116 void GpuCommandBufferStub::SendUpdateVSyncParameters(base::TimeTicks timebase,
1118 base::TimeDelta interval) { 1117 base::TimeDelta interval) {
1119 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase, 1118 Send(new GpuCommandBufferMsg_UpdateVSyncParameters(route_id_, timebase,
1120 interval)); 1119 interval));
1121 } 1120 }
1122 1121
1123 } // namespace gpu 1122 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/client/command_buffer_proxy_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698