| OLD | NEW |
| (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 |
| OLD | NEW |