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

Unified Diff: gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h

Issue 10124016: Addition of GL_CHROMIUM_copy_texture extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Removing dangling error checking code. 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
Index: gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h
===================================================================
--- gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h (revision 0)
+++ gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h (revision 0)
@@ -0,0 +1,41 @@
+// 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.
+
+#ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_
+#define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_
+
+#include "gpu/command_buffer/service/gl_utils.h"
+
+// This class encapsulates the resources required to implement the
+// GL_CHROMIUM_copy_texture extension. The copy operation is performed
+// via a blit to a framebuffer object.
+class CopyTextureCHROMIUMResourceManager {
+ public:
+ CopyTextureCHROMIUMResourceManager() : initialized_(false) {}
+
+ void Initialize();
+ void Destroy();
+
+ void DoCopyTexture(GLenum target, GLuint source_id, GLuint dest_id,
+ GLint level, bool flip_y, bool premultiply_alpha);
+
+ // The attributes used during invocation of the extension.
+ static const GLuint kVertexPositionAttrib = 0;
+ static const GLuint kVertexTextureAttrib = 1;
+
+ private:
+ bool initialized_;
+
+ static const int kNumPrograms = 4;
+ GLuint programs_[kNumPrograms];
+ GLuint buffer_ids_[2];
+ GLuint framebuffer_;
+ GLuint sampler_locations_[kNumPrograms];
+
+ DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager);
+};
+
+#endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_
+
+
Property changes on: gpu\command_buffer\service\gles2_cmd_copy_texture_chromium.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « gpu/command_buffer/service/gl_utils.h ('k') | gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698