| 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/program_manager.h" | 5 #include "gpu/command_buffer/service/program_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 cache->SaveLinkedProgram(service_id(), | 584 cache->SaveLinkedProgram(service_id(), |
| 585 attached_shaders_[0].get(), | 585 attached_shaders_[0].get(), |
| 586 vertex_translator, | 586 vertex_translator, |
| 587 attached_shaders_[1].get(), | 587 attached_shaders_[1].get(), |
| 588 fragment_translator, | 588 fragment_translator, |
| 589 &bind_attrib_location_map_, | 589 &bind_attrib_location_map_, |
| 590 shader_callback); | 590 shader_callback); |
| 591 } | 591 } |
| 592 UMA_HISTOGRAM_CUSTOM_COUNTS( | 592 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 593 "GPU.ProgramCache.BinaryCacheMissTime", | 593 "GPU.ProgramCache.BinaryCacheMissTime", |
| 594 (TimeTicks::HighResNow() - before_time).InMicroseconds(), | 594 static_cast<base::HistogramBase::Sample>( |
| 595 (TimeTicks::HighResNow() - before_time).InMicroseconds()), |
| 595 0, | 596 0, |
| 596 TimeDelta::FromSeconds(10).InMicroseconds(), | 597 static_cast<base::HistogramBase::Sample>( |
| 598 TimeDelta::FromSeconds(10).InMicroseconds()), |
| 597 50); | 599 50); |
| 598 } else { | 600 } else { |
| 599 UMA_HISTOGRAM_CUSTOM_COUNTS( | 601 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 600 "GPU.ProgramCache.BinaryCacheHitTime", | 602 "GPU.ProgramCache.BinaryCacheHitTime", |
| 601 (TimeTicks::HighResNow() - before_time).InMicroseconds(), | 603 static_cast<base::HistogramBase::Sample>( |
| 604 (TimeTicks::HighResNow() - before_time).InMicroseconds()), |
| 602 0, | 605 0, |
| 603 TimeDelta::FromSeconds(1).InMicroseconds(), | 606 static_cast<base::HistogramBase::Sample>( |
| 607 TimeDelta::FromSeconds(1).InMicroseconds()), |
| 604 50); | 608 50); |
| 605 } | 609 } |
| 606 } else { | 610 } else { |
| 607 UpdateLogInfo(); | 611 UpdateLogInfo(); |
| 608 } | 612 } |
| 609 return success == GL_TRUE; | 613 return success == GL_TRUE; |
| 610 } | 614 } |
| 611 | 615 |
| 612 void Program::Validate() { | 616 void Program::Validate() { |
| 613 if (!IsValid()) { | 617 if (!IsValid()) { |
| (...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1373 DCHECK(program); | 1377 DCHECK(program); |
| 1374 program->ClearUniforms(&zero_); | 1378 program->ClearUniforms(&zero_); |
| 1375 } | 1379 } |
| 1376 | 1380 |
| 1377 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { | 1381 int32 ProgramManager::MakeFakeLocation(int32 index, int32 element) { |
| 1378 return index + element * 0x10000; | 1382 return index + element * 0x10000; |
| 1379 } | 1383 } |
| 1380 | 1384 |
| 1381 } // namespace gles2 | 1385 } // namespace gles2 |
| 1382 } // namespace gpu | 1386 } // namespace gpu |
| OLD | NEW |