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

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

Issue 2376293003: gpu: support RG_88 GpuMemoryBuffer (Closed)
Patch Set: resolve hubbe's review Created 4 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/ozone/gl/gl_image_ozone_native_pixmap.cc ('k') | ui/ozone/platform/drm/common/drm_util.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/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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 format == gfx::BufferFormat::BGRX_8888 || 55 format == gfx::BufferFormat::BGRX_8888 ||
56 format == gfx::BufferFormat::YVU_420; 56 format == gfx::BufferFormat::YVU_420;
57 case gfx::BufferUsage::SCANOUT: 57 case gfx::BufferUsage::SCANOUT:
58 return format == gfx::BufferFormat::BGRX_8888 || 58 return format == gfx::BufferFormat::BGRX_8888 ||
59 format == gfx::BufferFormat::RGBX_8888; 59 format == gfx::BufferFormat::RGBX_8888;
60 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE: 60 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE:
61 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT: { 61 case gfx::BufferUsage::GPU_READ_CPU_READ_WRITE_PERSISTENT: {
62 #if defined(OS_CHROMEOS) 62 #if defined(OS_CHROMEOS)
63 return 63 return
64 #if defined(ARCH_CPU_X86_FAMILY) 64 #if defined(ARCH_CPU_X86_FAMILY)
65 // Currently only Intel driver (i.e. minigbm and Mesa) supports R_8. 65 // Currently only Intel driver (i.e. minigbm and Mesa) supports R_8
66 // crbug.com/356871 66 // and RG_88. crbug.com/356871
67 format == gfx::BufferFormat::R_8 || 67 format == gfx::BufferFormat::R_8 ||
68 format == gfx::BufferFormat::RG_88 ||
68 #endif 69 #endif
69 format == gfx::BufferFormat::BGRA_8888; 70 format == gfx::BufferFormat::BGRA_8888;
70 #else 71 #else
71 return false; 72 return false;
72 #endif 73 #endif
73 } 74 }
74 } 75 }
75 NOTREACHED(); 76 NOTREACHED();
76 return false; 77 return false;
77 } 78 }
(...skipping 23 matching lines...) Expand all
101 } 102 }
102 103
103 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactoryGbm); 104 DISALLOW_COPY_AND_ASSIGN(ClientNativePixmapFactoryGbm);
104 }; 105 };
105 106
106 ClientNativePixmapFactory* CreateClientNativePixmapFactoryGbm() { 107 ClientNativePixmapFactory* CreateClientNativePixmapFactoryGbm() {
107 return new ClientNativePixmapFactoryGbm(); 108 return new ClientNativePixmapFactoryGbm();
108 } 109 }
109 110
110 } // namespace ui 111 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/gl/gl_image_ozone_native_pixmap.cc ('k') | ui/ozone/platform/drm/common/drm_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698