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 "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h" | 5 #include "ui/gfx/linux/client_native_pixmap_factory_dmabuf.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE: | 71 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE: |
72 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT: { | 72 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT: { |
73 #if defined(OS_CHROMEOS) | 73 #if defined(OS_CHROMEOS) |
74 return | 74 return |
75 #if defined(ARCH_CPU_X86_FAMILY) | 75 #if defined(ARCH_CPU_X86_FAMILY) |
76 // Currently only Intel driver (i.e. minigbm and Mesa) supports R_8 | 76 // Currently only Intel driver (i.e. minigbm and Mesa) supports R_8 |
77 // and RG_88. crbug.com/356871 | 77 // and RG_88. crbug.com/356871 |
78 format == gfx::BufferFormat::R_8 || | 78 format == gfx::BufferFormat::R_8 || |
79 format == gfx::BufferFormat::RG_88 || | 79 format == gfx::BufferFormat::RG_88 || |
80 #endif | 80 #endif |
| 81 format == gfx::BufferFormat::YUV_420_BIPLANAR || |
81 format == gfx::BufferFormat::BGRA_8888; | 82 format == gfx::BufferFormat::BGRA_8888; |
82 #else | 83 #else |
83 return false; | 84 return false; |
84 #endif | 85 #endif |
85 } | 86 } |
86 } | 87 } |
87 NOTREACHED(); | 88 NOTREACHED(); |
88 return false; | 89 return false; |
89 } | 90 } |
90 std::unique_ptr<ClientNativePixmap> ImportFromHandle( | 91 std::unique_ptr<ClientNativePixmap> ImportFromHandle( |
(...skipping 23 matching lines...) Expand all Loading... |
114 } | 115 } |
115 | 116 |
116 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactoryDmabuf); | 117 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactoryDmabuf); |
117 }; | 118 }; |
118 | 119 |
119 ClientNativePixmapFactory* CreateClientNativePixmapFactoryDmabuf() { | 120 ClientNativePixmapFactory* CreateClientNativePixmapFactoryDmabuf() { |
120 return new ClientNativePixmapFactoryDmabuf(); | 121 return new ClientNativePixmapFactoryDmabuf(); |
121 } | 122 } |
122 | 123 |
123 } // namespace gfx | 124 } // namespace gfx |
OLD | NEW |