| 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 <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 | 1408 |
| 1409 if (feature_info_->feature_flags().arb_texture_rectangle) { | 1409 if (feature_info_->feature_flags().arb_texture_rectangle) { |
| 1410 default_textures_[kRectangleARB] = CreateDefaultAndBlackTextures( | 1410 default_textures_[kRectangleARB] = CreateDefaultAndBlackTextures( |
| 1411 GL_TEXTURE_RECTANGLE_ARB, &black_texture_ids_[kRectangleARB]); | 1411 GL_TEXTURE_RECTANGLE_ARB, &black_texture_ids_[kRectangleARB]); |
| 1412 } | 1412 } |
| 1413 | 1413 |
| 1414 // When created from InProcessCommandBuffer, we won't have a |memory_tracker_| | 1414 // When created from InProcessCommandBuffer, we won't have a |memory_tracker_| |
| 1415 // so don't register a dump provider. | 1415 // so don't register a dump provider. |
| 1416 if (memory_tracker_) { | 1416 if (memory_tracker_) { |
| 1417 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( | 1417 base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( |
| 1418 this, base::ThreadTaskRunnerHandle::Get()); | 1418 this, "gpu::TextureManager", base::ThreadTaskRunnerHandle::Get()); |
| 1419 } | 1419 } |
| 1420 | 1420 |
| 1421 return true; | 1421 return true; |
| 1422 } | 1422 } |
| 1423 | 1423 |
| 1424 scoped_refptr<TextureRef> | 1424 scoped_refptr<TextureRef> |
| 1425 TextureManager::CreateDefaultAndBlackTextures( | 1425 TextureManager::CreateDefaultAndBlackTextures( |
| 1426 GLenum target, | 1426 GLenum target, |
| 1427 GLuint* black_texture) { | 1427 GLuint* black_texture) { |
| 1428 static uint8 black[] = {0, 0, 0, 255}; | 1428 static uint8 black[] = {0, 0, 0, 255}; |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2163 pmd->AddOwnershipEdge(client_guid, service_guid, importance); | 2163 pmd->AddOwnershipEdge(client_guid, service_guid, importance); |
| 2164 | 2164 |
| 2165 // Dump all sub-levels held by the texture. They will appear below the main | 2165 // Dump all sub-levels held by the texture. They will appear below the main |
| 2166 // gl/textures/client_X/texture_Y dump. | 2166 // gl/textures/client_X/texture_Y dump. |
| 2167 ref->texture()->DumpLevelMemory(pmd, memory_tracker_->ClientTracingId(), | 2167 ref->texture()->DumpLevelMemory(pmd, memory_tracker_->ClientTracingId(), |
| 2168 dump_name); | 2168 dump_name); |
| 2169 } | 2169 } |
| 2170 | 2170 |
| 2171 } // namespace gles2 | 2171 } // namespace gles2 |
| 2172 } // namespace gpu | 2172 } // namespace gpu |
| OLD | NEW |