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

Side by Side Diff: components/exo/buffer.cc

Issue 2296433002: Add NV12 buffer scanout support from exo to ozone. (Closed)
Patch Set: Don't claim that image_ycbcr_420v is available. Created 4 years, 3 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
« no previous file with comments | « no previous file | components/exo/wayland/server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, // DXT5 45 GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, // DXT5
46 GL_ETC1_RGB8_OES, // ETC1 46 GL_ETC1_RGB8_OES, // ETC1
47 GL_R8_EXT, // R_8 47 GL_R8_EXT, // R_8
48 GL_RGB, // BGR_565 48 GL_RGB, // BGR_565
49 GL_RGBA, // RGBA_4444 49 GL_RGBA, // RGBA_4444
50 GL_RGB, // RGBX_8888 50 GL_RGB, // RGBX_8888
51 GL_RGBA, // RGBA_8888 51 GL_RGBA, // RGBA_8888
52 GL_RGB, // BGRX_8888 52 GL_RGB, // BGRX_8888
53 GL_BGRA_EXT, // BGRA_8888 53 GL_BGRA_EXT, // BGRA_8888
54 GL_RGB_YCRCB_420_CHROMIUM, // YVU_420 54 GL_RGB_YCRCB_420_CHROMIUM, // YVU_420
55 GL_INVALID_ENUM, // YUV_420_BIPLANAR 55 GL_RGB_YCBCR_420V_CHROMIUM, // YUV_420_BIPLANAR
56 GL_RGB_YCBCR_422_CHROMIUM, // UYVY_422 56 GL_RGB_YCBCR_422_CHROMIUM, // UYVY_422
57 }; 57 };
58 static_assert(arraysize(kGLInternalFormats) == 58 static_assert(arraysize(kGLInternalFormats) ==
59 (static_cast<int>(gfx::BufferFormat::LAST) + 1), 59 (static_cast<int>(gfx::BufferFormat::LAST) + 1),
60 "BufferFormat::LAST must be last value of kGLInternalFormats"); 60 "BufferFormat::LAST must be last value of kGLInternalFormats");
61 61
62 DCHECK(format <= gfx::BufferFormat::LAST); 62 DCHECK(format <= gfx::BufferFormat::LAST);
63 return kGLInternalFormats[static_cast<int>(format)]; 63 return kGLInternalFormats[static_cast<int>(format)];
64 } 64 }
65 65
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 } 540 }
541 541
542 void Buffer::ReleaseContentsTexture(std::unique_ptr<Texture> texture) { 542 void Buffer::ReleaseContentsTexture(std::unique_ptr<Texture> texture) {
543 TRACE_EVENT0("exo", "Buffer::ReleaseContentsTexture"); 543 TRACE_EVENT0("exo", "Buffer::ReleaseContentsTexture");
544 544
545 contents_texture_ = std::move(texture); 545 contents_texture_ = std::move(texture);
546 Release(); 546 Release();
547 } 547 }
548 548
549 } // namespace exo 549 } // namespace exo
OLDNEW
« no previous file with comments | « no previous file | components/exo/wayland/server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698