| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import "ui/base/cocoa/underlay_opengl_hosting_window.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 |
| 9 @implementation UnderlayOpenGLHostingWindow |
| 10 |
| 11 - (void)underlaySurfaceAdded { |
| 12 DCHECK_GE(underlaySurfaceCount_, 0); |
| 13 ++underlaySurfaceCount_; |
| 14 |
| 15 // We're having the OpenGL surface render under the window, so the window |
| 16 // needs to be not opaque. |
| 17 if (underlaySurfaceCount_ == 1) |
| 18 [self setOpaque:NO]; |
| 19 } |
| 20 |
| 21 - (void)underlaySurfaceRemoved { |
| 22 --underlaySurfaceCount_; |
| 23 DCHECK_GE(underlaySurfaceCount_, 0); |
| 24 |
| 25 if (underlaySurfaceCount_ == 0) |
| 26 [self setOpaque:YES]; |
| 27 } |
| 28 |
| 29 @end |
| OLD | NEW |