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

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

Issue 1309273005: native_viewport support for ozone (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 3 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/display/types/display_snapshot.cc ('k') | ui/gl/gl_surface_ozone.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 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/gl/gl_image_linux_dma_buffer.h" 5 #include "ui/gl/gl_image_linux_dma_buffer.h"
6 6
7 #include <unistd.h> 7 #include <unistd.h>
8 8
9 #define FOURCC(a, b, c, d) \ 9 #define FOURCC(a, b, c, d) \
10 ((static_cast<uint32>(a)) | (static_cast<uint32>(b) << 8) | \ 10 ((static_cast<uint32>(a)) | (static_cast<uint32>(b) << 8) | \
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 case gfx::GpuMemoryBuffer::ATCIA: 51 case gfx::GpuMemoryBuffer::ATCIA:
52 case gfx::GpuMemoryBuffer::DXT1: 52 case gfx::GpuMemoryBuffer::DXT1:
53 case gfx::GpuMemoryBuffer::DXT5: 53 case gfx::GpuMemoryBuffer::DXT5:
54 case gfx::GpuMemoryBuffer::ETC1: 54 case gfx::GpuMemoryBuffer::ETC1:
55 case gfx::GpuMemoryBuffer::RGBX_8888: 55 case gfx::GpuMemoryBuffer::RGBX_8888:
56 case gfx::GpuMemoryBuffer::RGBA_8888: 56 case gfx::GpuMemoryBuffer::RGBA_8888:
57 return false; 57 return false;
58 } 58 }
59 NOTREACHED(); 59 NOTREACHED();
60 return false; 60 return false;
61 case GL_BGRA_EXT:
62 return format == gfx::GpuMemoryBuffer::BGRA_8888;
61 default: 63 default:
62 return false; 64 return false;
63 } 65 }
64 } 66 }
65 67
66 EGLint FourCC(gfx::GpuMemoryBuffer::Format format) { 68 EGLint FourCC(gfx::GpuMemoryBuffer::Format format) {
67 switch (format) { 69 switch (format) {
68 case gfx::GpuMemoryBuffer::BGRA_8888: 70 case gfx::GpuMemoryBuffer::BGRA_8888:
69 return DRM_FORMAT_ARGB8888; 71 return DRM_FORMAT_ARGB8888;
70 case gfx::GpuMemoryBuffer::RGBX_8888: 72 case gfx::GpuMemoryBuffer::RGBX_8888:
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 EGL_DMA_BUF_PLANE0_OFFSET_EXT, 125 EGL_DMA_BUF_PLANE0_OFFSET_EXT,
124 0, 126 0,
125 EGL_DMA_BUF_PLANE0_PITCH_EXT, 127 EGL_DMA_BUF_PLANE0_PITCH_EXT,
126 pitch, 128 pitch,
127 EGL_NONE}; 129 EGL_NONE};
128 return GLImageEGL::Initialize( 130 return GLImageEGL::Initialize(
129 EGL_LINUX_DMA_BUF_EXT, static_cast<EGLClientBuffer>(NULL), attrs); 131 EGL_LINUX_DMA_BUF_EXT, static_cast<EGLClientBuffer>(NULL), attrs);
130 } 132 }
131 133
132 } // namespace gfx 134 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/display/types/display_snapshot.cc ('k') | ui/gl/gl_surface_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698