Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: gpu/command_buffer/service/program_manager.cc

Issue 660093004: Type conversion fixes, gpu/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/program_cache.cc ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698