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

Side by Side Diff: gpu/command_buffer/client/scoped_visibility_impl.cc

Issue 2252163003: Update Context Client Visibility to use Scoped Pattern (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "gpu/command_buffer/client/scoped_visibility_impl.h"
6
7 #include "base/logging.h"
8
9 namespace gpu {
10
11 ScopedVisibilityImpl::ScopedVisibilityImpl(ContextSupport* context_support)
12 : initial_context_support_(context_support), released_(false) {}
13
14 ScopedVisibilityImpl::~ScopedVisibilityImpl() {
15 DCHECK(released_);
16 }
17
18 void ScopedVisibilityImpl::Release(ContextSupport* context_support) {
19 DCHECK(!released_);
20 DCHECK_EQ(initial_context_support_, context_support);
21 released_ = true;
22 }
23
24 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698