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

Side by Side Diff: content/browser/gpu/shader_disk_cache.cc

Issue 503253003: Remove implicit conversions from scoped_refptr to T* in content/*/gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « content/browser/gpu/gpu_ipc_browsertests.cc ('k') | content/common/gpu/client/gl_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/browser/gpu/shader_disk_cache.h" 5 #include "content/browser/gpu/shader_disk_cache.h"
6 6
7 #include "base/threading/thread_checker.h" 7 #include "base/threading/thread_checker.h"
8 #include "content/browser/gpu/gpu_process_host.h" 8 #include "content/browser/gpu/gpu_process_host.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "gpu/command_buffer/common/constants.h" 10 #include "gpu/command_buffer/common/constants.h"
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 } 538 }
539 539
540 void ShaderDiskCache::Cache(const std::string& key, const std::string& shader) { 540 void ShaderDiskCache::Cache(const std::string& key, const std::string& shader) {
541 if (!cache_available_) 541 if (!cache_available_)
542 return; 542 return;
543 543
544 scoped_refptr<ShaderDiskCacheEntry> shim = 544 scoped_refptr<ShaderDiskCacheEntry> shim =
545 new ShaderDiskCacheEntry(AsWeakPtr(), key, shader); 545 new ShaderDiskCacheEntry(AsWeakPtr(), key, shader);
546 shim->Cache(); 546 shim->Cache();
547 547
548 entry_map_[shim] = shim; 548 entry_map_[shim.get()] = shim;
549 } 549 }
550 550
551 int ShaderDiskCache::Clear( 551 int ShaderDiskCache::Clear(
552 const base::Time begin_time, const base::Time end_time, 552 const base::Time begin_time, const base::Time end_time,
553 const net::CompletionCallback& completion_callback) { 553 const net::CompletionCallback& completion_callback) {
554 int rv; 554 int rv;
555 if (begin_time.is_null()) { 555 if (begin_time.is_null()) {
556 rv = backend_->DoomAllEntries(completion_callback); 556 rv = backend_->DoomAllEntries(completion_callback);
557 } else { 557 } else {
558 rv = backend_->DoomEntriesBetween(begin_time, end_time, 558 rv = backend_->DoomEntriesBetween(begin_time, end_time,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 const net::CompletionCallback& callback) { 608 const net::CompletionCallback& callback) {
609 if (entry_map_.empty()) { 609 if (entry_map_.empty()) {
610 return net::OK; 610 return net::OK;
611 } 611 }
612 cache_complete_callback_ = callback; 612 cache_complete_callback_ = callback;
613 return net::ERR_IO_PENDING; 613 return net::ERR_IO_PENDING;
614 } 614 }
615 615
616 } // namespace content 616 } // namespace content
617 617
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_ipc_browsertests.cc ('k') | content/common/gpu/client/gl_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698