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

Unified Diff: gpu/command_buffer/service/texture_definition.cc

Issue 10106015: Allow textures to be moved from one GL context group to another. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « gpu/command_buffer/service/texture_definition.h ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_definition.cc
===================================================================
--- gpu/command_buffer/service/texture_definition.cc (revision 0)
+++ gpu/command_buffer/service/texture_definition.cc (revision 0)
@@ -0,0 +1,49 @@
+// Copyright (c) 2012 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 "gpu/command_buffer/service/texture_definition.h"
+
+namespace gpu {
+namespace gles2 {
+
+TextureDefinition::LevelInfo::LevelInfo(GLenum target,
+ GLenum internal_format,
+ GLsizei width,
+ GLsizei height,
+ GLsizei depth,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ bool cleared)
+ : target(target),
+ internal_format(internal_format),
+ width(width),
+ height(height),
+ depth(depth),
+ border(border),
+ format(format),
+ type(type),
+ cleared(cleared) {
+}
+
+TextureDefinition::TextureDefinition(GLenum target,
+ GLuint service_id,
+ const LevelInfos& level_infos)
+ : target_(target),
+ service_id_(service_id),
+ level_infos_(level_infos) {
+}
+
+TextureDefinition::~TextureDefinition() {
+ DCHECK_EQ(0U, service_id_) << "TextureDefinition leaked texture.";
+}
+
+GLuint TextureDefinition::ReleaseServiceId() {
+ GLuint service_id = service_id_;
+ service_id_ = 0;
+ return service_id;
+}
+
+} // namespace gles2
+} // namespace gpu
Property changes on: gpu\command_buffer\service\texture_definition.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « gpu/command_buffer/service/texture_definition.h ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698