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

Unified Diff: gpu/ipc/host/shader_disk_cache.cc

Issue 2555693005: gpu: Move ShaderDiskCache into //gpu/ipc/host component. (Closed)
Patch Set: tot merge Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/ipc/host/shader_disk_cache.h ('k') | gpu/ipc/host/shader_disk_cache_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/host/shader_disk_cache.cc
diff --git a/content/browser/gpu/shader_disk_cache.cc b/gpu/ipc/host/shader_disk_cache.cc
similarity index 97%
rename from content/browser/gpu/shader_disk_cache.cc
rename to gpu/ipc/host/shader_disk_cache.cc
index 601edec0c1d04b428fd9a841a7b8a3ece0357c13..ff09ae77771c4b557301200bd71521e0f63d9ba1 100644
--- a/content/browser/gpu/shader_disk_cache.cc
+++ b/gpu/ipc/host/shader_disk_cache.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/gpu/shader_disk_cache.h"
+#include "gpu/ipc/host/shader_disk_cache.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
@@ -13,7 +13,7 @@
#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
-namespace content {
+namespace gpu {
namespace {
@@ -77,7 +77,6 @@ class ShaderDiskReadHelper : public base::ThreadChecker {
ITERATION_FINISHED
};
-
void OnOpComplete(int rv);
int OpenNextEntry();
@@ -109,11 +108,7 @@ class ShaderClearHelper : public base::ThreadChecker {
void Clear();
private:
- enum OpType {
- TERMINATE,
- VERIFY_CACHE_SETUP,
- DELETE_CACHE
- };
+ enum OpType { TERMINATE, VERIFY_CACHE_SETUP, DELETE_CACHE };
void DoClearShaderCache(int rv);
@@ -376,8 +371,7 @@ ShaderCacheFactory::ShaderCacheFactory(
scoped_refptr<base::SingleThreadTaskRunner> cache_task_runner)
: cache_task_runner_(std::move(cache_task_runner)) {}
-ShaderCacheFactory::~ShaderCacheFactory() {
-}
+ShaderCacheFactory::~ShaderCacheFactory() {}
void ShaderCacheFactory::SetCacheInfo(int32_t client_id,
const base::FilePath& path) {
@@ -516,15 +510,15 @@ void ShaderDiskCache::Cache(const std::string& key, const std::string& shader) {
entries_.insert(std::make_pair(raw_ptr, std::move(shim)));
}
-int ShaderDiskCache::Clear(
- const base::Time begin_time, const base::Time end_time,
- const net::CompletionCallback& completion_callback) {
+int ShaderDiskCache::Clear(const base::Time begin_time,
+ const base::Time end_time,
+ const net::CompletionCallback& completion_callback) {
int rv;
if (begin_time.is_null()) {
rv = backend_->DoomAllEntries(completion_callback);
} else {
- rv = backend_->DoomEntriesBetween(begin_time, end_time,
- completion_callback);
+ rv =
+ backend_->DoomEntriesBetween(begin_time, end_time, completion_callback);
}
return rv;
}
@@ -581,4 +575,4 @@ int ShaderDiskCache::SetCacheCompleteCallback(
return net::ERR_IO_PENDING;
}
-} // namespace content
+} // namespace gpu
« no previous file with comments | « gpu/ipc/host/shader_disk_cache.h ('k') | gpu/ipc/host/shader_disk_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698