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

Side by Side Diff: ui/gl/gl_image_ozone_native_pixmap.cc

Issue 1316493004: Add support for converting I420 software frames into NV12 hardware frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snapshot
Patch Set: Created 5 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 | « ui/gl/gl_image_memory.cc ('k') | no next file » | 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 "ui/gl/gl_image_ozone_native_pixmap.h" 5 #include "ui/gl/gl_image_ozone_native_pixmap.h"
6 6
7 #define FOURCC(a, b, c, d) \ 7 #define FOURCC(a, b, c, d) \
8 ((static_cast<uint32>(a)) | (static_cast<uint32>(b) << 8) | \ 8 ((static_cast<uint32>(a)) | (static_cast<uint32>(b) << 8) | \
9 (static_cast<uint32>(c) << 16) | (static_cast<uint32>(d) << 24)) 9 (static_cast<uint32>(c) << 16) | (static_cast<uint32>(d) << 24))
10 10
(...skipping 20 matching lines...) Expand all
31 return true; 31 return true;
32 case BufferFormat::ATC: 32 case BufferFormat::ATC:
33 case BufferFormat::ATCIA: 33 case BufferFormat::ATCIA:
34 case BufferFormat::DXT1: 34 case BufferFormat::DXT1:
35 case BufferFormat::DXT5: 35 case BufferFormat::DXT5:
36 case BufferFormat::ETC1: 36 case BufferFormat::ETC1:
37 case BufferFormat::R_8: 37 case BufferFormat::R_8:
38 case BufferFormat::RGBA_4444: 38 case BufferFormat::RGBA_4444:
39 case BufferFormat::RGBA_8888: 39 case BufferFormat::RGBA_8888:
40 case BufferFormat::YUV_420: 40 case BufferFormat::YUV_420:
41 case BufferFormat::YUV_420_BIPLANAR:
41 case BufferFormat::UYVY_422: 42 case BufferFormat::UYVY_422:
42 return false; 43 return false;
43 } 44 }
44 45
45 NOTREACHED(); 46 NOTREACHED();
46 return false; 47 return false;
47 } 48 }
48 49
49 EGLint FourCC(gfx::BufferFormat format) { 50 EGLint FourCC(gfx::BufferFormat format) {
50 switch (format) { 51 switch (format) {
51 case BufferFormat::BGRA_8888: 52 case BufferFormat::BGRA_8888:
52 return DRM_FORMAT_ARGB8888; 53 return DRM_FORMAT_ARGB8888;
53 case BufferFormat::BGRX_8888: 54 case BufferFormat::BGRX_8888:
54 return DRM_FORMAT_XRGB8888; 55 return DRM_FORMAT_XRGB8888;
55 case BufferFormat::ATC: 56 case BufferFormat::ATC:
56 case BufferFormat::ATCIA: 57 case BufferFormat::ATCIA:
57 case BufferFormat::DXT1: 58 case BufferFormat::DXT1:
58 case BufferFormat::DXT5: 59 case BufferFormat::DXT5:
59 case BufferFormat::ETC1: 60 case BufferFormat::ETC1:
60 case BufferFormat::R_8: 61 case BufferFormat::R_8:
61 case BufferFormat::RGBA_4444: 62 case BufferFormat::RGBA_4444:
62 case BufferFormat::RGBA_8888: 63 case BufferFormat::RGBA_8888:
63 case BufferFormat::YUV_420: 64 case BufferFormat::YUV_420:
65 case BufferFormat::YUV_420_BIPLANAR:
64 case BufferFormat::UYVY_422: 66 case BufferFormat::UYVY_422:
65 NOTREACHED(); 67 NOTREACHED();
66 return 0; 68 return 0;
67 } 69 }
68 70
69 NOTREACHED(); 71 NOTREACHED();
70 return 0; 72 return 0;
71 } 73 }
72 74
73 } // namespace 75 } // namespace
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 144 }
143 145
144 void GLImageOzoneNativePixmap::OnMemoryDump( 146 void GLImageOzoneNativePixmap::OnMemoryDump(
145 base::trace_event::ProcessMemoryDump* pmd, 147 base::trace_event::ProcessMemoryDump* pmd,
146 uint64_t process_tracing_id, 148 uint64_t process_tracing_id,
147 const std::string& dump_name) { 149 const std::string& dump_name) {
148 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914 150 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914
149 } 151 }
150 152
151 } // namespace gfx 153 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_image_memory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698