| 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/service/texture_manager.h" | 5 #include "gpu/command_buffer/service/texture_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bits.h" | 10 #include "base/bits.h" |
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 info.width == 0 || | 937 info.width == 0 || |
| 938 info.height == 0 || | 938 info.height == 0 || |
| 939 info.depth == 0) { | 939 info.depth == 0) { |
| 940 return true; | 940 return true; |
| 941 } | 941 } |
| 942 | 942 |
| 943 // NOTE: It seems kind of gross to call back into the decoder for this | 943 // NOTE: It seems kind of gross to call back into the decoder for this |
| 944 // but only the decoder knows all the state (like unpack_alignment_) that's | 944 // but only the decoder knows all the state (like unpack_alignment_) that's |
| 945 // needed to be able to call GL correctly. | 945 // needed to be able to call GL correctly. |
| 946 bool cleared = decoder->ClearLevel( | 946 bool cleared = decoder->ClearLevel( |
| 947 service_id_, target_, info.target, info.level, info.internal_format, | 947 this, info.target, info.level, info.internal_format, info.format, |
| 948 info.format, info.type, info.width, info.height, immutable_); | 948 info.type, info.width, info.height, immutable_); |
| 949 UpdateMipCleared(&info, cleared); | 949 UpdateMipCleared(&info, cleared); |
| 950 return info.cleared; | 950 return info.cleared; |
| 951 } | 951 } |
| 952 | 952 |
| 953 void Texture::SetLevelImage( | 953 void Texture::SetLevelImage( |
| 954 const FeatureInfo* feature_info, | 954 const FeatureInfo* feature_info, |
| 955 GLenum target, | 955 GLenum target, |
| 956 GLint level, | 956 GLint level, |
| 957 gfx::GLImage* image) { | 957 gfx::GLImage* image) { |
| 958 DCHECK_GE(level, 0); | 958 DCHECK_GE(level, 0); |
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 } | 1722 } |
| 1723 | 1723 |
| 1724 ScopedTextureUploadTimer::~ScopedTextureUploadTimer() { | 1724 ScopedTextureUploadTimer::~ScopedTextureUploadTimer() { |
| 1725 texture_state_->texture_upload_count++; | 1725 texture_state_->texture_upload_count++; |
| 1726 texture_state_->total_texture_upload_time += | 1726 texture_state_->total_texture_upload_time += |
| 1727 base::TimeTicks::Now() - begin_time_; | 1727 base::TimeTicks::Now() - begin_time_; |
| 1728 } | 1728 } |
| 1729 | 1729 |
| 1730 } // namespace gles2 | 1730 } // namespace gles2 |
| 1731 } // namespace gpu | 1731 } // namespace gpu |
| OLD | NEW |