OLD | NEW |
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 "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" | 5 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
9 #include "content/common/android/surface_texture_manager.h" | 9 #include "content/common/android/surface_texture_manager.h" |
10 #include "ui/gl/gl_bindings.h" | 10 #include "ui/gl/gl_bindings.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 namespace { | 13 namespace { |
14 | 14 |
15 int WindowFormat(gfx::BufferFormat format) { | 15 int WindowFormat(gfx::BufferFormat format) { |
16 switch (format) { | 16 switch (format) { |
17 case gfx::BufferFormat::RGBA_8888: | 17 case gfx::BufferFormat::RGBA_8888: |
18 return WINDOW_FORMAT_RGBA_8888; | 18 return WINDOW_FORMAT_RGBA_8888; |
19 case gfx::BufferFormat::ATC: | 19 case gfx::BufferFormat::ATC: |
20 case gfx::BufferFormat::ATCIA: | 20 case gfx::BufferFormat::ATCIA: |
21 case gfx::BufferFormat::DXT1: | 21 case gfx::BufferFormat::DXT1: |
22 case gfx::BufferFormat::DXT5: | 22 case gfx::BufferFormat::DXT5: |
23 case gfx::BufferFormat::ETC1: | 23 case gfx::BufferFormat::ETC1: |
24 case gfx::BufferFormat::R_8: | 24 case gfx::BufferFormat::R_8: |
25 case gfx::BufferFormat::RGBA_4444: | 25 case gfx::BufferFormat::RGBA_4444: |
26 case gfx::BufferFormat::RGBX_8888: | 26 case gfx::BufferFormat::RGBX_8888: |
27 case gfx::BufferFormat::BGRA_8888: | 27 case gfx::BufferFormat::BGRA_8888: |
28 case gfx::BufferFormat::YUV_420: | 28 case gfx::BufferFormat::YUV_420: |
| 29 case gfx::BufferFormat::YUV_420_BIPLANAR: |
29 NOTREACHED(); | 30 NOTREACHED(); |
30 return 0; | 31 return 0; |
31 } | 32 } |
32 | 33 |
33 NOTREACHED(); | 34 NOTREACHED(); |
34 return 0; | 35 return 0; |
35 } | 36 } |
36 | 37 |
37 } // namespace | 38 } // namespace |
38 | 39 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 109 |
109 gfx::GpuMemoryBufferHandle GpuMemoryBufferImplSurfaceTexture::GetHandle() | 110 gfx::GpuMemoryBufferHandle GpuMemoryBufferImplSurfaceTexture::GetHandle() |
110 const { | 111 const { |
111 gfx::GpuMemoryBufferHandle handle; | 112 gfx::GpuMemoryBufferHandle handle; |
112 handle.type = gfx::SURFACE_TEXTURE_BUFFER; | 113 handle.type = gfx::SURFACE_TEXTURE_BUFFER; |
113 handle.id = id_; | 114 handle.id = id_; |
114 return handle; | 115 return handle; |
115 } | 116 } |
116 | 117 |
117 } // namespace content | 118 } // namespace content |
OLD | NEW |