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 |