Index: content/browser/gpu/shader_cache_factory.h |
diff --git a/content/browser/gpu/shader_cache_factory.h b/content/browser/gpu/shader_cache_factory.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..57cb5966e5f89dbc972e8b34901f6d8f49a2968d |
--- /dev/null |
+++ b/content/browser/gpu/shader_cache_factory.h |
@@ -0,0 +1,27 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_BROWSER_GPU_SHADER_CACHE_FACTORY_H_ |
+#define CONTENT_BROWSER_GPU_SHADER_CACHE_FACTORY_H_ |
+ |
+#include "content/browser/gpu/shader_disk_cache.h" |
+#include "content/common/content_export.h" |
+ |
+namespace content { |
+ |
+// Initializes the ShaderCacheFactory singleton instance. The singleton |
+// instance is created and used in the thread associated with |task_runner|. |
+// |cache_task_runner| is associated with the thread responsible for managing |
+// the disk cache. |
+CONTENT_EXPORT void InitShaderCacheFactorySingleton( |
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
+ scoped_refptr<base::SingleThreadTaskRunner> cache_task_runner); |
+ |
+// Returns an instance previously created by InitShaderCacheFactorySingleton(). |
+// This can return nullptr if an instance has not yet been created. |
+CONTENT_EXPORT ShaderCacheFactory* GetShaderCacheFactorySingleton(); |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_GPU_SHADER_CACHE_FACTORY_H_ |