| 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::R_8: |
| 44 return (width + 3) & ~0x3; |
| 43 case gfx::GpuMemoryBuffer::ATCIA: | 45 case gfx::GpuMemoryBuffer::ATCIA: |
| 44 case gfx::GpuMemoryBuffer::DXT5: | 46 case gfx::GpuMemoryBuffer::DXT5: |
| 45 return width; | 47 return width; |
| 46 case gfx::GpuMemoryBuffer::ATC: | 48 case gfx::GpuMemoryBuffer::ATC: |
| 47 case gfx::GpuMemoryBuffer::DXT1: | 49 case gfx::GpuMemoryBuffer::DXT1: |
| 48 case gfx::GpuMemoryBuffer::ETC1: | 50 case gfx::GpuMemoryBuffer::ETC1: |
| 49 DCHECK_EQ(width % 2, 0U); | 51 DCHECK_EQ(width % 2, 0U); |
| 50 return width / 2; | 52 return width / 2; |
| 51 case gfx::GpuMemoryBuffer::RGBA_8888: | 53 case gfx::GpuMemoryBuffer::RGBA_8888: |
| 52 case gfx::GpuMemoryBuffer::BGRA_8888: | 54 case gfx::GpuMemoryBuffer::BGRA_8888: |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { | 438 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { |
| 437 NOTIMPLEMENTED(); | 439 NOTIMPLEMENTED(); |
| 438 return 0; | 440 return 0; |
| 439 } | 441 } |
| 440 | 442 |
| 441 void GLManager::SetLock(base::Lock*) { | 443 void GLManager::SetLock(base::Lock*) { |
| 442 NOTIMPLEMENTED(); | 444 NOTIMPLEMENTED(); |
| 443 } | 445 } |
| 444 | 446 |
| 445 } // namespace gpu | 447 } // namespace gpu |
| OLD | NEW |