| 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 <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 5733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5744 GLsizei tex_height = 0; | 5744 GLsizei tex_height = 0; |
| 5745 GLenum tex_type = 0; | 5745 GLenum tex_type = 0; |
| 5746 GLenum tex_format = 0; | 5746 GLenum tex_format = 0; |
| 5747 bool level_is_same = | 5747 bool level_is_same = |
| 5748 info->GetLevelSize(target, level, &tex_width, &tex_height) && | 5748 info->GetLevelSize(target, level, &tex_width, &tex_height) && |
| 5749 info->GetLevelType(target, level, &tex_type, &tex_format) && | 5749 info->GetLevelType(target, level, &tex_type, &tex_format) && |
| 5750 width == tex_width && height == tex_height && | 5750 width == tex_width && height == tex_height && |
| 5751 type == tex_type && format == tex_format; | 5751 type == tex_type && format == tex_format; |
| 5752 | 5752 |
| 5753 if (level_is_same && !pixels) { | 5753 if (level_is_same && !pixels) { |
| 5754 tex_image_2d_failed_ = false; |
| 5754 return error::kNoError; | 5755 return error::kNoError; |
| 5755 } | 5756 } |
| 5756 | 5757 |
| 5757 scoped_array<int8> zero; | 5758 scoped_array<int8> zero; |
| 5758 if (!pixels) { | 5759 if (!pixels) { |
| 5759 zero.reset(new int8[pixels_size]); | 5760 zero.reset(new int8[pixels_size]); |
| 5760 memset(zero.get(), 0, pixels_size); | 5761 memset(zero.get(), 0, pixels_size); |
| 5761 pixels = zero.get(); | 5762 pixels = zero.get(); |
| 5762 } | 5763 } |
| 5763 | 5764 |
| (...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6813 return false; | 6814 return false; |
| 6814 } | 6815 } |
| 6815 | 6816 |
| 6816 // Include the auto-generated part of this file. We split this because it means | 6817 // Include the auto-generated part of this file. We split this because it means |
| 6817 // we can easily edit the non-auto generated parts right here in this file | 6818 // we can easily edit the non-auto generated parts right here in this file |
| 6818 // instead of having to edit some template or the code generator. | 6819 // instead of having to edit some template or the code generator. |
| 6819 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 6820 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 6820 | 6821 |
| 6821 } // namespace gles2 | 6822 } // namespace gles2 |
| 6822 } // namespace gpu | 6823 } // namespace gpu |
| OLD | NEW |