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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1484 DCHECK_LT(static_cast<size_t>(level), | 1484 DCHECK_LT(static_cast<size_t>(level), |
1485 face_infos_[face_index].level_infos.size()); | 1485 face_infos_[face_index].level_infos.size()); |
1486 Texture::LevelInfo& info = | 1486 Texture::LevelInfo& info = |
1487 face_infos_[face_index].level_infos[level]; | 1487 face_infos_[face_index].level_infos[level]; |
1488 DCHECK_EQ(info.target, target); | 1488 DCHECK_EQ(info.target, target); |
1489 DCHECK_EQ(info.level, level); | 1489 DCHECK_EQ(info.level, level); |
1490 info.image = image; | 1490 info.image = image; |
1491 info.stream_texture_image = stream_texture_image; | 1491 info.stream_texture_image = stream_texture_image; |
1492 info.image_state = state; | 1492 info.image_state = state; |
1493 | 1493 |
1494 // Reset the unowned service id because if the previously bound image owned | |
1495 // it, it would have become invalid when that image was destructed. | |
1496 SetUnownedServiceId(0); | |
piman
2016/05/26 22:09:16
I think I understand the semantics this is trying
| |
1494 UpdateCanRenderCondition(); | 1497 UpdateCanRenderCondition(); |
1495 UpdateHasImages(); | 1498 UpdateHasImages(); |
1496 UpdateEmulatingRGB(); | 1499 UpdateEmulatingRGB(); |
1497 } | 1500 } |
1498 | 1501 |
1499 void Texture::SetLevelImage(GLenum target, | 1502 void Texture::SetLevelImage(GLenum target, |
1500 GLint level, | 1503 GLint level, |
1501 gl::GLImage* image, | 1504 gl::GLImage* image, |
1502 ImageState state) { | 1505 ImageState state) { |
1503 SetLevelImageInternal(target, level, image, nullptr, state); | 1506 SetLevelImageInternal(target, level, image, nullptr, state); |
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3309 uint32_t TextureManager::GetServiceIdGeneration() const { | 3312 uint32_t TextureManager::GetServiceIdGeneration() const { |
3310 return current_service_id_generation_; | 3313 return current_service_id_generation_; |
3311 } | 3314 } |
3312 | 3315 |
3313 void TextureManager::IncrementServiceIdGeneration() { | 3316 void TextureManager::IncrementServiceIdGeneration() { |
3314 current_service_id_generation_++; | 3317 current_service_id_generation_++; |
3315 } | 3318 } |
3316 | 3319 |
3317 } // namespace gles2 | 3320 } // namespace gles2 |
3318 } // namespace gpu | 3321 } // namespace gpu |
OLD | NEW |