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

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

Issue 9968113: Addition of GL_CHROMIUM_copy_texture extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Correcting glEnableVertexAttribArray state. 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;
greggman 2012/04/17 04:58:06 Do you mind adding COMPILE_ASSERT( kVertexPos
Jeff Timanus 2012/04/18 14:59:08 Done. Why would they fail on DesktopGL? Are 1 an
greggman 2012/04/19 00:39:39 It would fail on Desktop GL because, though undocu
+
+ 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

Powered by Google App Engine
This is Rietveld 408576698