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

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: Adding extension implementation files. Created 8 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: 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,40 @@
+// 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() {}
+ ~CopyTextureCHROMIUMResourceManager();
+
+ void Initialize();
+
+ void DoCopyTexture(GLenum target,GLuint source_id, GLuint dest_id,
+ GLint level, bool flip_y, bool premultiply_alpha);
+
+ private:
+ void FreeResources();
+
+ static const int kNumShaders = 5;
+ static const int kNumPrograms = 4;
+ GLuint shaders_[kNumShaders];
+ GLuint programs_[kNumPrograms];
+ GLuint buffer_ids_[2];
+ GLuint framebuffer_;
+
+ GLuint position_locations_[kNumPrograms];
+ GLuint texture_coordinate_locations_[kNumPrograms];
+ 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