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

Side by Side Diff: ui/ozone/platform/drm/client_native_pixmap_factory_gbm.cc

Issue 2052003006: More YVU_420 buffers support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address dnicoara's comment. Created 4 years, 6 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
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/ozone/platform/drm/client_native_pixmap_factory_gbm.h" 5 #include "ui/ozone/platform/drm/client_native_pixmap_factory_gbm.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 27 matching lines...) Expand all
38 38
39 // ClientNativePixmapFactory: 39 // ClientNativePixmapFactory:
40 bool IsConfigurationSupported(gfx::BufferFormat format, 40 bool IsConfigurationSupported(gfx::BufferFormat format,
41 gfx::BufferUsage usage) const override { 41 gfx::BufferUsage usage) const override {
42 switch (usage) { 42 switch (usage) {
43 case gfx::BufferUsage::GPU_READ: 43 case gfx::BufferUsage::GPU_READ:
44 return format == gfx::BufferFormat::BGR_565 || 44 return format == gfx::BufferFormat::BGR_565 ||
45 format == gfx::BufferFormat::RGBA_8888 || 45 format == gfx::BufferFormat::RGBA_8888 ||
46 format == gfx::BufferFormat::RGBX_8888 || 46 format == gfx::BufferFormat::RGBX_8888 ||
47 format == gfx::BufferFormat::BGRA_8888 || 47 format == gfx::BufferFormat::BGRA_8888 ||
48 format == gfx::BufferFormat::BGRX_8888; 48 format == gfx::BufferFormat::BGRX_8888 ||
49 format == gfx::BufferFormat::YVU_420;
49 case gfx::BufferUsage::SCANOUT: 50 case gfx::BufferUsage::SCANOUT:
50 return format == gfx::BufferFormat::BGRX_8888; 51 return format == gfx::BufferFormat::BGRX_8888;
51 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE: 52 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE:
52 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT: { 53 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT: {
53 #if defined(OS_CHROMEOS) 54 #if defined(OS_CHROMEOS)
54 return 55 return
55 #if defined(ARCH_CPU_X86_FAMILY) 56 #if defined(ARCH_CPU_X86_FAMILY)
56 // Currently only Intel driver (i.e. minigbm and Mesa) supports R_8. 57 // Currently only Intel driver (i.e. minigbm and Mesa) supports R_8.
57 // crbug.com/356871 58 // crbug.com/356871
58 format == gfx::BufferFormat::R_8 || 59 format == gfx::BufferFormat::R_8 ||
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 94 }
94 95
95 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactoryGbm); 96 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactoryGbm);
96 }; 97 };
97 98
98 ClientNativePixmapFactory* CreateClientNativePixmapFactoryGbm() { 99 ClientNativePixmapFactory* CreateClientNativePixmapFactoryGbm() {
99 return new ClientNativePixmapFactoryGbm(); 100 return new ClientNativePixmapFactoryGbm();
100 } 101 }
101 102
102 } // namespace ui 103 } // namespace ui
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | ui/ozone/platform/drm/gpu/gbm_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698