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::GpuMemoryBuffer::Format format) { | 15 int WindowFormat(gfx::GpuMemoryBuffer::Format format) { |
16 switch (format) { | 16 switch (format) { |
17 case gfx::GpuMemoryBuffer::RGBA_8888: | 17 case gfx::GpuMemoryBuffer::RGBA_8888: |
18 return WINDOW_FORMAT_RGBA_8888; | 18 return WINDOW_FORMAT_RGBA_8888; |
| 19 case gfx::GpuMemoryBuffer::ATC: |
| 20 case gfx::GpuMemoryBuffer::ATCIA: |
| 21 case gfx::GpuMemoryBuffer::DXT1: |
| 22 case gfx::GpuMemoryBuffer::DXT5: |
| 23 case gfx::GpuMemoryBuffer::ETC1: |
19 case gfx::GpuMemoryBuffer::RGBX_8888: | 24 case gfx::GpuMemoryBuffer::RGBX_8888: |
20 case gfx::GpuMemoryBuffer::BGRA_8888: | 25 case gfx::GpuMemoryBuffer::BGRA_8888: |
21 NOTREACHED(); | 26 NOTREACHED(); |
22 return 0; | 27 return 0; |
23 } | 28 } |
24 | 29 |
25 NOTREACHED(); | 30 NOTREACHED(); |
26 return 0; | 31 return 0; |
27 } | 32 } |
28 | 33 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 104 |
100 gfx::GpuMemoryBufferHandle GpuMemoryBufferImplSurfaceTexture::GetHandle() | 105 gfx::GpuMemoryBufferHandle GpuMemoryBufferImplSurfaceTexture::GetHandle() |
101 const { | 106 const { |
102 gfx::GpuMemoryBufferHandle handle; | 107 gfx::GpuMemoryBufferHandle handle; |
103 handle.type = gfx::SURFACE_TEXTURE_BUFFER; | 108 handle.type = gfx::SURFACE_TEXTURE_BUFFER; |
104 handle.id = id_; | 109 handle.id = id_; |
105 return handle; | 110 return handle; |
106 } | 111 } |
107 | 112 |
108 } // namespace content | 113 } // namespace content |
OLD | NEW |