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

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

Issue 1415723006: ui: Add RGBX_8888 buffer format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gles but no conversion needed case Created 5 years, 2 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') | ui/gl/gl_image_ref_counted_memory_unittest.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 "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 21 matching lines...) Expand all
32 case BufferFormat::BGRA_8888: 32 case BufferFormat::BGRA_8888:
33 case BufferFormat::BGRX_8888: 33 case BufferFormat::BGRX_8888:
34 return true; 34 return true;
35 case BufferFormat::ATC: 35 case BufferFormat::ATC:
36 case BufferFormat::ATCIA: 36 case BufferFormat::ATCIA:
37 case BufferFormat::DXT1: 37 case BufferFormat::DXT1:
38 case BufferFormat::DXT5: 38 case BufferFormat::DXT5:
39 case BufferFormat::ETC1: 39 case BufferFormat::ETC1:
40 case BufferFormat::R_8: 40 case BufferFormat::R_8:
41 case BufferFormat::RGBA_4444: 41 case BufferFormat::RGBA_4444:
42 case BufferFormat::RGBX_8888:
42 case BufferFormat::YUV_420: 43 case BufferFormat::YUV_420:
43 case BufferFormat::YUV_420_BIPLANAR: 44 case BufferFormat::YUV_420_BIPLANAR:
44 case BufferFormat::UYVY_422: 45 case BufferFormat::UYVY_422:
45 return false; 46 return false;
46 } 47 }
47 48
48 NOTREACHED(); 49 NOTREACHED();
49 return false; 50 return false;
50 } 51 }
51 52
52 EGLint FourCC(BufferFormat format) { 53 EGLint FourCC(BufferFormat format) {
53 switch (format) { 54 switch (format) {
54 case BufferFormat::RGBA_8888: 55 case BufferFormat::RGBA_8888:
55 return DRM_FORMAT_ABGR8888; 56 return DRM_FORMAT_ABGR8888;
56 case BufferFormat::BGRA_8888: 57 case BufferFormat::BGRA_8888:
57 return DRM_FORMAT_ARGB8888; 58 return DRM_FORMAT_ARGB8888;
58 case BufferFormat::BGRX_8888: 59 case BufferFormat::BGRX_8888:
59 return DRM_FORMAT_XRGB8888; 60 return DRM_FORMAT_XRGB8888;
60 case BufferFormat::ATC: 61 case BufferFormat::ATC:
61 case BufferFormat::ATCIA: 62 case BufferFormat::ATCIA:
62 case BufferFormat::DXT1: 63 case BufferFormat::DXT1:
63 case BufferFormat::DXT5: 64 case BufferFormat::DXT5:
64 case BufferFormat::ETC1: 65 case BufferFormat::ETC1:
65 case BufferFormat::R_8: 66 case BufferFormat::R_8:
66 case BufferFormat::RGBA_4444: 67 case BufferFormat::RGBA_4444:
68 case BufferFormat::RGBX_8888:
67 case BufferFormat::YUV_420: 69 case BufferFormat::YUV_420:
68 case BufferFormat::YUV_420_BIPLANAR: 70 case BufferFormat::YUV_420_BIPLANAR:
69 case BufferFormat::UYVY_422: 71 case BufferFormat::UYVY_422:
70 NOTREACHED(); 72 NOTREACHED();
71 return 0; 73 return 0;
72 } 74 }
73 75
74 NOTREACHED(); 76 NOTREACHED();
75 return 0; 77 return 0;
76 } 78 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 150 }
149 151
150 void GLImageOzoneNativePixmap::OnMemoryDump( 152 void GLImageOzoneNativePixmap::OnMemoryDump(
151 base::trace_event::ProcessMemoryDump* pmd, 153 base::trace_event::ProcessMemoryDump* pmd,
152 uint64_t process_tracing_id, 154 uint64_t process_tracing_id,
153 const std::string& dump_name) { 155 const std::string& dump_name) {
154 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914 156 // TODO(ericrk): Implement GLImage OnMemoryDump. crbug.com/514914
155 } 157 }
156 158
157 } // namespace gfx 159 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_image_memory.cc ('k') | ui/gl/gl_image_ref_counted_memory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698