OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_GL_STREAM_TEXTURE_IMAGE_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GL_STREAM_TEXTURE_IMAGE_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_GL_STREAM_TEXTURE_IMAGE_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GL_STREAM_TEXTURE_IMAGE_H_ |
7 | 7 |
8 #include "gpu/gpu_export.h" | 8 #include "gpu/gpu_export.h" |
9 #include "ui/gl/gl_image.h" | 9 #include "ui/gl/gl_image.h" |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 virtual void GetTextureMatrix(float matrix[16]) = 0; | 24 virtual void GetTextureMatrix(float matrix[16]) = 0; |
25 | 25 |
26 // Copy the texture matrix for this image into |matrix|, returning a matrix | 26 // Copy the texture matrix for this image into |matrix|, returning a matrix |
27 // for which UV=(0,0) corresponds to the top left of corner of the image, | 27 // for which UV=(0,0) corresponds to the top left of corner of the image, |
28 // which is what Chromium generally expects. | 28 // which is what Chromium generally expects. |
29 void GetFlippedTextureMatrix(float matrix[16]) { | 29 void GetFlippedTextureMatrix(float matrix[16]) { |
30 GetTextureMatrix(matrix); | 30 GetTextureMatrix(matrix); |
31 matrix[13] += matrix[5]; | 31 matrix[13] += matrix[5]; |
32 matrix[5] = -matrix[5]; | 32 matrix[5] = -matrix[5]; |
33 } | 33 } |
| 34 |
| 35 void Flush() override {} |
| 36 |
34 protected: | 37 protected: |
35 ~GLStreamTextureImage() override {} | 38 ~GLStreamTextureImage() override {} |
36 | 39 |
37 private: | 40 private: |
38 DISALLOW_COPY_AND_ASSIGN(GLStreamTextureImage); | 41 DISALLOW_COPY_AND_ASSIGN(GLStreamTextureImage); |
39 }; | 42 }; |
40 | 43 |
41 } // namespace gles2 | 44 } // namespace gles2 |
42 } // namespace gpu | 45 } // namespace gpu |
43 | 46 |
44 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_STREAM_TEXTURE_IMAGE_H_ | 47 #endif // GPU_COMMAND_BUFFER_SERVICE_GL_STREAM_TEXTURE_IMAGE_H_ |
OLD | NEW |