summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/service/mocks.h
diff options
context:
space:
mode:
authordsinclair@chromium.org <dsinclair@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-13 00:01:37 +0000
committerdsinclair@chromium.org <dsinclair@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-13 00:01:37 +0000
commite3932abb978b39d8b28db6e9b7d15869d817dad2 (patch)
treee86df2495c23edf37fb72c2e6b306ef0f0458c70 /gpu/command_buffer/service/mocks.h
parenta11b00cf82c61489fe42878204375524fa2f952a (diff)
downloadchromium_src-e3932abb978b39d8b28db6e9b7d15869d817dad2.zip
chromium_src-e3932abb978b39d8b28db6e9b7d15869d817dad2.tar.gz
chromium_src-e3932abb978b39d8b28db6e9b7d15869d817dad2.tar.bz2
Add per-profile disk caching of complied GPU shaders.
This CL adds a per-profile disk cache for any shaders that are complied while using the profile. When the profile is first opened the shaders will be loaded from disk and used to pre-populate the GPU memory shader cache. The disk cache takes the load time for From Dust from ~30 seconds to ~18 seconds on my Linux machine for any loads after the first. BUG=166763 Review URL: https://chromiumcodereview.appspot.com/12036056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187704 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/service/mocks.h')
-rw-r--r--gpu/command_buffer/service/mocks.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/gpu/command_buffer/service/mocks.h b/gpu/command_buffer/service/mocks.h
index 35fc9c1..949314d 100644
--- a/gpu/command_buffer/service/mocks.h
+++ b/gpu/command_buffer/service/mocks.h
@@ -10,6 +10,7 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_
#define GPU_COMMAND_BUFFER_SERVICE_MOCKS_H_
+#include <string>
#include <vector>
#include "base/logging.h"
@@ -103,11 +104,14 @@ class MockProgramCache : public ProgramCache {
Shader* shader_b,
const LocationMap* bind_attrib_location_map));
- MOCK_METHOD4(SaveLinkedProgram, void(
+ MOCK_METHOD5(SaveLinkedProgram, void(
GLuint program,
const Shader* shader_a,
const Shader* shader_b,
- const LocationMap* bind_attrib_location_map));
+ const LocationMap* bind_attrib_location_map,
+ const ShaderCacheCallback& callback));
+ MOCK_METHOD1(LoadProgram, void(const std::string&));
+
private:
MOCK_METHOD0(ClearBackend, void());
};