| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1275 ClearLinkStatus(); | 1275 ClearLinkStatus(); |
| 1276 | 1276 |
| 1277 if (!AttachedShadersExist()) { | 1277 if (!AttachedShadersExist()) { |
| 1278 set_log_info("missing shaders"); | 1278 set_log_info("missing shaders"); |
| 1279 return false; | 1279 return false; |
| 1280 } | 1280 } |
| 1281 | 1281 |
| 1282 TimeTicks before_time = TimeTicks::Now(); | 1282 TimeTicks before_time = TimeTicks::Now(); |
| 1283 bool link = true; | 1283 bool link = true; |
| 1284 ProgramCache* cache = manager_->program_cache_; | 1284 ProgramCache* cache = manager_->program_cache_; |
| 1285 if (cache) { | 1285 if (cache && |
| 1286 DCHECK(!attached_shaders_[0]->last_compiled_source().empty() && | 1286 !attached_shaders_[0]->last_compiled_source().empty() && |
| 1287 !attached_shaders_[1]->last_compiled_source().empty()); | 1287 !attached_shaders_[1]->last_compiled_source().empty()) { |
| 1288 ProgramCache::LinkedProgramStatus status = cache->GetLinkedProgramStatus( | 1288 ProgramCache::LinkedProgramStatus status = cache->GetLinkedProgramStatus( |
| 1289 attached_shaders_[0]->last_compiled_signature(), | 1289 attached_shaders_[0]->last_compiled_signature(), |
| 1290 attached_shaders_[1]->last_compiled_signature(), | 1290 attached_shaders_[1]->last_compiled_signature(), |
| 1291 &bind_attrib_location_map_, | 1291 &bind_attrib_location_map_, |
| 1292 transform_feedback_varyings_, | 1292 transform_feedback_varyings_, |
| 1293 transform_feedback_buffer_mode_); | 1293 transform_feedback_buffer_mode_); |
| 1294 | 1294 |
| 1295 bool cache_hit = status == ProgramCache::LINK_SUCCEEDED; | 1295 bool cache_hit = status == ProgramCache::LINK_SUCCEEDED; |
| 1296 UMA_HISTOGRAM_BOOLEAN("GPU.ProgramCache.CacheHit", cache_hit); | 1296 UMA_HISTOGRAM_BOOLEAN("GPU.ProgramCache.CacheHit", cache_hit); |
| 1297 | 1297 |
| (...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2660 DCHECK(program); | 2660 DCHECK(program); |
| 2661 program->ClearUniforms(&zero_); | 2661 program->ClearUniforms(&zero_); |
| 2662 } | 2662 } |
| 2663 | 2663 |
| 2664 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) { | 2664 int32_t ProgramManager::MakeFakeLocation(int32_t index, int32_t element) { |
| 2665 return index + element * 0x10000; | 2665 return index + element * 0x10000; |
| 2666 } | 2666 } |
| 2667 | 2667 |
| 2668 } // namespace gles2 | 2668 } // namespace gles2 |
| 2669 } // namespace gpu | 2669 } // namespace gpu |
| OLD | NEW |