| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include "base/atomicops.h" | 7 #include "base/atomicops.h" |
| 8 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
| 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 10 #include "gpu/command_buffer/common/gl_mock.h" | 10 #include "gpu/command_buffer/common/gl_mock.h" |
| (...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1638 const GLsizei kWidth = 5; | 1638 const GLsizei kWidth = 5; |
| 1639 const GLsizei kHeight = 3; | 1639 const GLsizei kHeight = 3; |
| 1640 const GLint kBytesPerPixel = 3; | 1640 const GLint kBytesPerPixel = 3; |
| 1641 const GLint kPackAlignment = 4; | 1641 const GLint kPackAlignment = 4; |
| 1642 static const int8 kSrcPixels[kWidth * kHeight * kBytesPerPixel] = { | 1642 static const int8 kSrcPixels[kWidth * kHeight * kBytesPerPixel] = { |
| 1643 12, 13, 14, 18, 19, 18, 19, 12, 13, 14, 18, 19, 18, 19, 13, | 1643 12, 13, 14, 18, 19, 18, 19, 12, 13, 14, 18, 19, 18, 19, 13, |
| 1644 29, 28, 23, 22, 21, 22, 21, 29, 28, 23, 22, 21, 22, 21, 28, | 1644 29, 28, 23, 22, 21, 22, 21, 29, 28, 23, 22, 21, 22, 21, 28, |
| 1645 31, 34, 39, 37, 32, 37, 32, 31, 34, 39, 37, 32, 37, 32, 34, | 1645 31, 34, 39, 37, 32, 37, 32, 31, 34, 39, 37, 32, 37, 32, 34, |
| 1646 }; | 1646 }; |
| 1647 | 1647 |
| 1648 context_->SetSize(gfx::Size(INT_MAX, INT_MAX)); | 1648 surface_->SetSize(gfx::Size(INT_MAX, INT_MAX)); |
| 1649 | 1649 |
| 1650 ReadPixelsEmulator emu( | 1650 ReadPixelsEmulator emu( |
| 1651 kWidth, kHeight, kBytesPerPixel, kSrcPixels, kSrcPixels, kPackAlignment); | 1651 kWidth, kHeight, kBytesPerPixel, kSrcPixels, kSrcPixels, kPackAlignment); |
| 1652 typedef ReadPixels::Result Result; | 1652 typedef ReadPixels::Result Result; |
| 1653 Result* result = GetSharedMemoryAs<Result*>(); | 1653 Result* result = GetSharedMemoryAs<Result*>(); |
| 1654 uint32 result_shm_id = kSharedMemoryId; | 1654 uint32 result_shm_id = kSharedMemoryId; |
| 1655 uint32 result_shm_offset = kSharedMemoryOffset; | 1655 uint32 result_shm_offset = kSharedMemoryOffset; |
| 1656 uint32 pixels_shm_id = kSharedMemoryId; | 1656 uint32 pixels_shm_id = kSharedMemoryId; |
| 1657 uint32 pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); | 1657 uint32 pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); |
| 1658 void* dest = &result[1]; | 1658 void* dest = &result[1]; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1684 12, 13, 14, 255, 19, 18, 19, 255, 13, 14, 18, 255, | 1684 12, 13, 14, 255, 19, 18, 19, 255, 13, 14, 18, 255, |
| 1685 29, 28, 23, 255, 21, 22, 21, 255, 28, 23, 22, 255, | 1685 29, 28, 23, 255, 21, 22, 21, 255, 28, 23, 22, 255, |
| 1686 31, 34, 39, 255, 32, 37, 32, 255, 34, 39, 37, 255, | 1686 31, 34, 39, 255, 32, 37, 32, 255, 34, 39, 37, 255, |
| 1687 }; | 1687 }; |
| 1688 static const uint8 kSrcPixels[kWidth * kHeight * kBytesPerPixel] = { | 1688 static const uint8 kSrcPixels[kWidth * kHeight * kBytesPerPixel] = { |
| 1689 12, 13, 14, 18, 19, 18, 19, 12, 13, 14, 18, 19, | 1689 12, 13, 14, 18, 19, 18, 19, 12, 13, 14, 18, 19, |
| 1690 29, 28, 23, 22, 21, 22, 21, 29, 28, 23, 22, 21, | 1690 29, 28, 23, 22, 21, 22, 21, 29, 28, 23, 22, 21, |
| 1691 31, 34, 39, 37, 32, 37, 32, 31, 34, 39, 37, 32, | 1691 31, 34, 39, 37, 32, 37, 32, 31, 34, 39, 37, 32, |
| 1692 }; | 1692 }; |
| 1693 | 1693 |
| 1694 context_->SetSize(gfx::Size(INT_MAX, INT_MAX)); | 1694 surface_->SetSize(gfx::Size(INT_MAX, INT_MAX)); |
| 1695 | 1695 |
| 1696 ReadPixelsEmulator emu( | 1696 ReadPixelsEmulator emu( |
| 1697 kWidth, kHeight, kBytesPerPixel, kSrcPixels, kExpectedPixels, | 1697 kWidth, kHeight, kBytesPerPixel, kSrcPixels, kExpectedPixels, |
| 1698 kPackAlignment); | 1698 kPackAlignment); |
| 1699 typedef ReadPixels::Result Result; | 1699 typedef ReadPixels::Result Result; |
| 1700 Result* result = GetSharedMemoryAs<Result*>(); | 1700 Result* result = GetSharedMemoryAs<Result*>(); |
| 1701 uint32 result_shm_id = kSharedMemoryId; | 1701 uint32 result_shm_id = kSharedMemoryId; |
| 1702 uint32 result_shm_offset = kSharedMemoryOffset; | 1702 uint32 result_shm_offset = kSharedMemoryOffset; |
| 1703 uint32 pixels_shm_id = kSharedMemoryId; | 1703 uint32 pixels_shm_id = kSharedMemoryId; |
| 1704 uint32 pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); | 1704 uint32 pixels_shm_offset = kSharedMemoryOffset + sizeof(*result); |
| (...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2958 // TODO(gman): TexImage2DImmediate | 2958 // TODO(gman): TexImage2DImmediate |
| 2959 | 2959 |
| 2960 // TODO(gman): TexSubImage2DImmediate | 2960 // TODO(gman): TexSubImage2DImmediate |
| 2961 | 2961 |
| 2962 // TODO(gman): UseProgram | 2962 // TODO(gman): UseProgram |
| 2963 | 2963 |
| 2964 // TODO(gman): SwapBuffers | 2964 // TODO(gman): SwapBuffers |
| 2965 | 2965 |
| 2966 } // namespace gles2 | 2966 } // namespace gles2 |
| 2967 } // namespace gpu | 2967 } // namespace gpu |
| OLD | NEW |