OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 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 "chromecast/ui/gfx/surface.h" |
| 6 |
| 7 #include "chromecast/ui/gfx/gfx_plane.h" |
| 8 |
| 9 namespace gfx { |
| 10 namespace chromecast { |
| 11 |
| 12 Surface::Surface(GfxPlane* arg_plane, const Size& arg_size) |
| 13 : plane_(arg_plane), |
| 14 size_(arg_size) { |
| 15 ++plane_->num_surfaces(); |
| 16 } |
| 17 |
| 18 Surface::~Surface() { |
| 19 // Informs this surface is removed. |
| 20 plane_->OnRemoved(this); |
| 21 --plane_->num_surfaces(); |
| 22 } |
| 23 |
| 24 } // namespace chromecast |
| 25 } // namespace gfx |
OLD | NEW |