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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_copy_texture_chromium.h

Issue 972833004: Revert of gpu: introduce glCopySubTextureCHROMIUM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 17 matching lines...) Expand all
28 ~CopyTextureCHROMIUMResourceManager(); 28 ~CopyTextureCHROMIUMResourceManager();
29 29
30 void Initialize(const gles2::GLES2Decoder* decoder); 30 void Initialize(const gles2::GLES2Decoder* decoder);
31 void Destroy(); 31 void Destroy();
32 32
33 void DoCopyTexture(const gles2::GLES2Decoder* decoder, 33 void DoCopyTexture(const gles2::GLES2Decoder* decoder,
34 GLenum source_target, 34 GLenum source_target,
35 GLuint source_id, 35 GLuint source_id,
36 GLenum source_internal_format, 36 GLenum source_internal_format,
37 GLuint dest_id, 37 GLuint dest_id,
38 GLint dest_level,
38 GLenum dest_internal_format, 39 GLenum dest_internal_format,
39 GLsizei width, 40 GLsizei width,
40 GLsizei height, 41 GLsizei height,
41 bool flip_y, 42 bool flip_y,
42 bool premultiply_alpha, 43 bool premultiply_alpha,
43 bool unpremultiply_alpha); 44 bool unpremultiply_alpha);
44 45
45 void DoCopySubTexture(const gles2::GLES2Decoder* decoder,
46 GLenum source_target,
47 GLuint source_id,
48 GLenum source_internal_format,
49 GLuint dest_id,
50 GLenum dest_internal_format,
51 GLint xoffset,
52 GLint yoffset,
53 GLsizei dest_width,
54 GLsizei dest_height,
55 GLsizei source_width,
56 GLsizei source_height,
57 bool flip_y,
58 bool premultiply_alpha,
59 bool unpremultiply_alpha);
60
61 // This will apply a transform on the source texture before copying to 46 // This will apply a transform on the source texture before copying to
62 // destination texture. 47 // destination texture.
63 void DoCopyTextureWithTransform(const gles2::GLES2Decoder* decoder, 48 void DoCopyTextureWithTransform(const gles2::GLES2Decoder* decoder,
64 GLenum source_target, 49 GLenum source_target,
65 GLuint source_id, 50 GLuint source_id,
66 GLuint dest_id, 51 GLuint dest_id,
52 GLint dest_level,
67 GLsizei width, 53 GLsizei width,
68 GLsizei height, 54 GLsizei height,
69 bool flip_y, 55 bool flip_y,
70 bool premultiply_alpha, 56 bool premultiply_alpha,
71 bool unpremultiply_alpha, 57 bool unpremultiply_alpha,
72 const GLfloat transform_matrix[16]); 58 const GLfloat transform_matrix[16]);
73 59
74 void DoCopySubTextureWithTransform(const gles2::GLES2Decoder* decoder,
75 GLenum source_target,
76 GLuint source_id,
77 GLuint dest_id,
78 GLint xoffset,
79 GLint yoffset,
80 GLsizei dest_width,
81 GLsizei dest_height,
82 GLsizei source_width,
83 GLsizei source_height,
84 bool flip_y,
85 bool premultiply_alpha,
86 bool unpremultiply_alpha,
87 const GLfloat transform_matrix[16]);
88
89 // The attributes used during invocation of the extension. 60 // The attributes used during invocation of the extension.
90 static const GLuint kVertexPositionAttrib = 0; 61 static const GLuint kVertexPositionAttrib = 0;
91 62
92 private: 63 private:
93 struct ProgramInfo { 64 struct ProgramInfo {
94 ProgramInfo() 65 ProgramInfo()
95 : program(0u), 66 : program(0u),
96 matrix_handle(0u), 67 matrix_handle(0u),
97 half_size_handle(0u), 68 half_size_handle(0u),
98 sampler_handle(0u) {} 69 sampler_handle(0u) {}
99 70
100 GLuint program; 71 GLuint program;
101 GLuint matrix_handle; 72 GLuint matrix_handle;
102 GLuint half_size_handle; 73 GLuint half_size_handle;
103 GLuint sampler_handle; 74 GLuint sampler_handle;
104 }; 75 };
105 76
106 void DoCopyTextureInternal(const gles2::GLES2Decoder* decoder,
107 GLenum source_target,
108 GLuint source_id,
109 GLuint dest_id,
110 GLint xoffset,
111 GLint yoffset,
112 GLsizei dest_width,
113 GLsizei dest_height,
114 GLsizei source_width,
115 GLsizei source_height,
116 bool flip_y,
117 bool premultiply_alpha,
118 bool unpremultiply_alpha,
119 const GLfloat transform_matrix[16]);
120
121 bool initialized_; 77 bool initialized_;
122 typedef std::vector<GLuint> ShaderVector; 78 typedef std::vector<GLuint> ShaderVector;
123 ShaderVector vertex_shaders_; 79 ShaderVector vertex_shaders_;
124 ShaderVector fragment_shaders_; 80 ShaderVector fragment_shaders_;
125 typedef std::pair<int, int> ProgramMapKey; 81 typedef std::pair<int, int> ProgramMapKey;
126 typedef base::hash_map<ProgramMapKey, ProgramInfo> ProgramMap; 82 typedef base::hash_map<ProgramMapKey, ProgramInfo> ProgramMap;
127 ProgramMap programs_; 83 ProgramMap programs_;
128 GLuint buffer_id_; 84 GLuint buffer_id_;
129 GLuint framebuffer_; 85 GLuint framebuffer_;
130 86
131 DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager); 87 DISALLOW_COPY_AND_ASSIGN(CopyTextureCHROMIUMResourceManager);
132 }; 88 };
133 89
134 } // namespace gpu. 90 } // namespace gpu.
135 91
136 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_ 92 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_COPY_TEXTURE_CHROMIUM_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_ids_autogen.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