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/memory_program_cache.h" | 5 #include "gpu/command_buffer/service/memory_program_cache.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram_macros.h" |
13 #include "base/sha1.h" | 13 #include "base/sha1.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "gpu/command_buffer/common/constants.h" | 15 #include "gpu/command_buffer/common/constants.h" |
16 #include "gpu/command_buffer/service/disk_cache_proto.pb.h" | 16 #include "gpu/command_buffer/service/disk_cache_proto.pb.h" |
17 #include "gpu/command_buffer/service/gl_utils.h" | 17 #include "gpu/command_buffer/service/gl_utils.h" |
18 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 18 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
19 #include "gpu/command_buffer/service/gpu_preferences.h" | 19 #include "gpu/command_buffer/service/gpu_preferences.h" |
20 #include "gpu/command_buffer/service/shader_manager.h" | 20 #include "gpu/command_buffer/service/shader_manager.h" |
21 #include "ui/gl/gl_bindings.h" | 21 #include "ui/gl/gl_bindings.h" |
22 | 22 |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 program_cache_->LinkedProgramCacheSuccess(program_hash); | 481 program_cache_->LinkedProgramCacheSuccess(program_hash); |
482 } | 482 } |
483 | 483 |
484 MemoryProgramCache::ProgramCacheValue::~ProgramCacheValue() { | 484 MemoryProgramCache::ProgramCacheValue::~ProgramCacheValue() { |
485 program_cache_->curr_size_bytes_ -= length_; | 485 program_cache_->curr_size_bytes_ -= length_; |
486 program_cache_->Evict(program_hash_); | 486 program_cache_->Evict(program_hash_); |
487 } | 487 } |
488 | 488 |
489 } // namespace gles2 | 489 } // namespace gles2 |
490 } // namespace gpu | 490 } // namespace gpu |
OLD | NEW |