| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "components/exo/buffer.h" | 5 #include "components/exo/buffer.h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
| 8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
| 9 #include <GLES2/gl2extchromium.h> | 9 #include <GLES2/gl2extchromium.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 const int kWaitForReleaseDelayMs = 500; | 39 const int kWaitForReleaseDelayMs = 500; |
| 40 | 40 |
| 41 GLenum GLInternalFormat(gfx::BufferFormat format) { | 41 GLenum GLInternalFormat(gfx::BufferFormat format) { |
| 42 const GLenum kGLInternalFormats[] = { | 42 const GLenum kGLInternalFormats[] = { |
| 43 GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD, // ATC | 43 GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD, // ATC |
| 44 GL_COMPRESSED_RGB_S3TC_DXT1_EXT, // ATCIA | 44 GL_COMPRESSED_RGB_S3TC_DXT1_EXT, // ATCIA |
| 45 GL_COMPRESSED_RGB_S3TC_DXT1_EXT, // DXT1 | 45 GL_COMPRESSED_RGB_S3TC_DXT1_EXT, // DXT1 |
| 46 GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, // DXT5 | 46 GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, // DXT5 |
| 47 GL_ETC1_RGB8_OES, // ETC1 | 47 GL_ETC1_RGB8_OES, // ETC1 |
| 48 GL_R8_EXT, // R_8 | 48 GL_R8_EXT, // R_8 |
| 49 GL_R16_EXT, // R_16 |
| 49 GL_RG8_EXT, // RG_88 | 50 GL_RG8_EXT, // RG_88 |
| 50 GL_RGB, // BGR_565 | 51 GL_RGB, // BGR_565 |
| 51 GL_RGBA, // RGBA_4444 | 52 GL_RGBA, // RGBA_4444 |
| 52 GL_RGB, // RGBX_8888 | 53 GL_RGB, // RGBX_8888 |
| 53 GL_RGBA, // RGBA_8888 | 54 GL_RGBA, // RGBA_8888 |
| 54 GL_RGB, // BGRX_8888 | 55 GL_RGB, // BGRX_8888 |
| 55 GL_BGRA_EXT, // BGRA_8888 | 56 GL_BGRA_EXT, // BGRA_8888 |
| 56 GL_RGBA, // RGBA_F16 | 57 GL_RGBA, // RGBA_F16 |
| 57 GL_RGB_YCRCB_420_CHROMIUM, // YVU_420 | 58 GL_RGB_YCRCB_420_CHROMIUM, // YVU_420 |
| 58 GL_RGB_YCBCR_420V_CHROMIUM, // YUV_420_BIPLANAR | 59 GL_RGB_YCBCR_420V_CHROMIUM, // YUV_420_BIPLANAR |
| (...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 if (attach_count_) { | 574 if (attach_count_) { |
| 574 TRACE_EVENT_ASYNC_STEP_INTO0("exo", "BufferInUse", gpu_memory_buffer_.get(), | 575 TRACE_EVENT_ASYNC_STEP_INTO0("exo", "BufferInUse", gpu_memory_buffer_.get(), |
| 575 "attached"); | 576 "attached"); |
| 576 } else { | 577 } else { |
| 577 // Release buffer if not attached to surface. | 578 // Release buffer if not attached to surface. |
| 578 Release(); | 579 Release(); |
| 579 } | 580 } |
| 580 } | 581 } |
| 581 | 582 |
| 582 } // namespace exo | 583 } // namespace exo |
| OLD | NEW |