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

Unified Diff: chromecast/ui/gfx/surface.cc

Issue 223143003: Initial checkin of chromecast content embedder (cast_shell) and related build scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add an additional function in gl_surface_cast.cc Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chromecast/ui/gfx/surface.cc
diff --git a/chromecast/ui/gfx/surface.cc b/chromecast/ui/gfx/surface.cc
new file mode 100644
index 0000000000000000000000000000000000000000..eac527728c474dedf5ab8bcc19ba5c814e54d3e3
--- /dev/null
+++ b/chromecast/ui/gfx/surface.cc
@@ -0,0 +1,25 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chromecast/ui/gfx/surface.h"
+
+#include "chromecast/ui/gfx/gfx_plane.h"
+
+namespace gfx {
+namespace chromecast {
+
+Surface::Surface(GfxPlane* arg_plane, const Size& arg_size)
+ : plane_(arg_plane),
+ size_(arg_size) {
+ ++plane_->num_surfaces();
+}
+
+Surface::~Surface() {
+ // Informs this surface is removed.
+ plane_->OnRemoved(this);
+ --plane_->num_surfaces();
+}
+
+} // namespace chromecast
+} // namespace gfx

Powered by Google App Engine
This is Rietveld 408576698