OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "gpu/command_buffer/tests/gl_manager.h" | 5 #include "gpu/command_buffer/tests/gl_manager.h" |
6 | 6 |
7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
9 #include <GLES2/gl2extchromium.h> | 9 #include <GLES2/gl2extchromium.h> |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "ui/gl/gl_context.h" | 33 #include "ui/gl/gl_context.h" |
34 #include "ui/gl/gl_image_ref_counted_memory.h" | 34 #include "ui/gl/gl_image_ref_counted_memory.h" |
35 #include "ui/gl/gl_share_group.h" | 35 #include "ui/gl/gl_share_group.h" |
36 #include "ui/gl/gl_surface.h" | 36 #include "ui/gl/gl_surface.h" |
37 | 37 |
38 namespace gpu { | 38 namespace gpu { |
39 namespace { | 39 namespace { |
40 | 40 |
41 size_t StrideInBytes(size_t width, gfx::GpuMemoryBuffer::Format format) { | 41 size_t StrideInBytes(size_t width, gfx::GpuMemoryBuffer::Format format) { |
42 switch (format) { | 42 switch (format) { |
| 43 case gfx::GpuMemoryBuffer::ATCIA: |
| 44 case gfx::GpuMemoryBuffer::DXT5: |
| 45 return width; |
| 46 case gfx::GpuMemoryBuffer::ATC: |
| 47 case gfx::GpuMemoryBuffer::DXT1: |
| 48 case gfx::GpuMemoryBuffer::ETC1: |
| 49 DCHECK_EQ(width % 2, 0U); |
| 50 return width / 2; |
43 case gfx::GpuMemoryBuffer::RGBA_8888: | 51 case gfx::GpuMemoryBuffer::RGBA_8888: |
44 case gfx::GpuMemoryBuffer::BGRA_8888: | 52 case gfx::GpuMemoryBuffer::BGRA_8888: |
45 return width * 4; | 53 return width * 4; |
46 case gfx::GpuMemoryBuffer::RGBX_8888: | 54 case gfx::GpuMemoryBuffer::RGBX_8888: |
47 NOTREACHED(); | 55 NOTREACHED(); |
48 return 0; | 56 return 0; |
49 } | 57 } |
50 | 58 |
51 NOTREACHED(); | 59 NOTREACHED(); |
52 return 0; | 60 return 0; |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { | 435 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { |
428 NOTIMPLEMENTED(); | 436 NOTIMPLEMENTED(); |
429 return 0; | 437 return 0; |
430 } | 438 } |
431 | 439 |
432 void GLManager::SetLock(base::Lock*) { | 440 void GLManager::SetLock(base::Lock*) { |
433 NOTIMPLEMENTED(); | 441 NOTIMPLEMENTED(); |
434 } | 442 } |
435 | 443 |
436 } // namespace gpu | 444 } // namespace gpu |
OLD | NEW |