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

Side by Side Diff: ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc

Issue 916083002: Add support for compressed GPU memory buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ozone Created 5 years, 9 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_shared_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/gpu/gpu_memory_buffer_factory_ozone_native_buffer.h" 5 #include "ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/gl/gl_image_egl.h" 8 #include "ui/gl/gl_image_egl.h"
9 #include "ui/gl/gl_image_linux_dma_buffer.h" 9 #include "ui/gl/gl_image_linux_dma_buffer.h"
10 #include "ui/ozone/public/native_pixmap.h" 10 #include "ui/ozone/public/native_pixmap.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 scoped_refptr<NativePixmap> pixmap_; 73 scoped_refptr<NativePixmap> pixmap_;
74 }; 74 };
75 75
76 SurfaceFactoryOzone::BufferFormat GetOzoneFormatFor( 76 SurfaceFactoryOzone::BufferFormat GetOzoneFormatFor(
77 gfx::GpuMemoryBuffer::Format format) { 77 gfx::GpuMemoryBuffer::Format format) {
78 switch (format) { 78 switch (format) {
79 case gfx::GpuMemoryBuffer::RGBA_8888: 79 case gfx::GpuMemoryBuffer::RGBA_8888:
80 return SurfaceFactoryOzone::RGBA_8888; 80 return SurfaceFactoryOzone::RGBA_8888;
81 case gfx::GpuMemoryBuffer::RGBX_8888: 81 case gfx::GpuMemoryBuffer::RGBX_8888:
82 return SurfaceFactoryOzone::RGBX_8888; 82 return SurfaceFactoryOzone::RGBX_8888;
83 case gfx::GpuMemoryBuffer::ATC:
84 case gfx::GpuMemoryBuffer::ATCIA:
85 case gfx::GpuMemoryBuffer::DXT1:
86 case gfx::GpuMemoryBuffer::DXT5:
87 case gfx::GpuMemoryBuffer::ETC1:
83 case gfx::GpuMemoryBuffer::BGRA_8888: 88 case gfx::GpuMemoryBuffer::BGRA_8888:
84 NOTREACHED(); 89 NOTREACHED();
85 return SurfaceFactoryOzone::RGBA_8888; 90 return SurfaceFactoryOzone::RGBA_8888;
86 } 91 }
87 92
88 NOTREACHED(); 93 NOTREACHED();
89 return SurfaceFactoryOzone::RGBA_8888; 94 return SurfaceFactoryOzone::RGBA_8888;
90 } 95 }
91 96
92 SurfaceFactoryOzone::BufferUsage GetOzoneUsageFor( 97 SurfaceFactoryOzone::BufferUsage GetOzoneUsageFor(
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 new GLImageOzoneNativePixmapDmaBuf(size, internalformat); 188 new GLImageOzoneNativePixmapDmaBuf(size, internalformat);
184 if (!image->Initialize(pixmap.get(), format)) { 189 if (!image->Initialize(pixmap.get(), format)) {
185 return scoped_refptr<gfx::GLImage>(); 190 return scoped_refptr<gfx::GLImage>();
186 } 191 }
187 return image; 192 return image;
188 } 193 }
189 return scoped_refptr<gfx::GLImage>(); 194 return scoped_refptr<gfx::GLImage>();
190 } 195 }
191 196
192 } // namespace ui 197 } // namespace ui
OLDNEW
« no previous file with comments | « ui/gl/gl_image_shared_memory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698