| 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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 estimated_size(rhs.estimated_size), | 397 estimated_size(rhs.estimated_size), |
| 398 internal_workaround(rhs.internal_workaround) {} | 398 internal_workaround(rhs.internal_workaround) {} |
| 399 | 399 |
| 400 Texture::LevelInfo::~LevelInfo() { | 400 Texture::LevelInfo::~LevelInfo() { |
| 401 } | 401 } |
| 402 | 402 |
| 403 Texture::FaceInfo::FaceInfo() | 403 Texture::FaceInfo::FaceInfo() |
| 404 : num_mip_levels(0) { | 404 : num_mip_levels(0) { |
| 405 } | 405 } |
| 406 | 406 |
| 407 Texture::FaceInfo::FaceInfo(const FaceInfo& other) = default; |
| 408 |
| 407 Texture::FaceInfo::~FaceInfo() { | 409 Texture::FaceInfo::~FaceInfo() { |
| 408 } | 410 } |
| 409 | 411 |
| 410 Texture::CanRenderCondition Texture::GetCanRenderCondition() const { | 412 Texture::CanRenderCondition Texture::GetCanRenderCondition() const { |
| 411 if (target_ == 0) | 413 if (target_ == 0) |
| 412 return CAN_RENDER_ALWAYS; | 414 return CAN_RENDER_ALWAYS; |
| 413 | 415 |
| 414 if (target_ != GL_TEXTURE_EXTERNAL_OES) { | 416 if (target_ != GL_TEXTURE_EXTERNAL_OES) { |
| 415 if (face_infos_.empty() || | 417 if (face_infos_.empty() || |
| 416 static_cast<size_t>(base_level_) >= face_infos_[0].level_infos.size()) { | 418 static_cast<size_t>(base_level_) >= face_infos_[0].level_infos.size()) { |
| (...skipping 2389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2806 uint32_t TextureManager::GetServiceIdGeneration() const { | 2808 uint32_t TextureManager::GetServiceIdGeneration() const { |
| 2807 return current_service_id_generation_; | 2809 return current_service_id_generation_; |
| 2808 } | 2810 } |
| 2809 | 2811 |
| 2810 void TextureManager::IncrementServiceIdGeneration() { | 2812 void TextureManager::IncrementServiceIdGeneration() { |
| 2811 current_service_id_generation_++; | 2813 current_service_id_generation_++; |
| 2812 } | 2814 } |
| 2813 | 2815 |
| 2814 } // namespace gles2 | 2816 } // namespace gles2 |
| 2815 } // namespace gpu | 2817 } // namespace gpu |
| OLD | NEW |