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

Side by Side Diff: gpu/command_buffer/service/memory_program_cache_unittest.cc

Issue 2378583003: Ping watchdog thread during GpuChannel destruction (Closed)
Patch Set: remove throttling Created 4 years, 2 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
OLDNEW
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 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 static const GLuint kVertexShaderServiceId = 100; 74 static const GLuint kVertexShaderServiceId = 100;
75 static const GLuint kFragmentShaderClientId = 91; 75 static const GLuint kFragmentShaderClientId = 91;
76 static const GLuint kFragmentShaderServiceId = 100; 76 static const GLuint kFragmentShaderServiceId = 100;
77 77
78 MemoryProgramCacheTest() 78 MemoryProgramCacheTest()
79 : cache_(new MemoryProgramCache(kCacheSizeBytes, kDisableGpuDiskCache)), 79 : cache_(new MemoryProgramCache(kCacheSizeBytes, kDisableGpuDiskCache)),
80 vertex_shader_(NULL), 80 vertex_shader_(NULL),
81 fragment_shader_(NULL), 81 fragment_shader_(NULL),
82 shader_cache_count_(0) { 82 shader_cache_count_(0) {
83 } 83 }
84 ~MemoryProgramCacheTest() override { shader_manager_.Destroy(false); } 84 ~MemoryProgramCacheTest() override {
85 shader_manager_.Destroy(false, nullptr);
86 }
85 87
86 void ShaderCacheCb(const std::string& key, const std::string& shader) { 88 void ShaderCacheCb(const std::string& key, const std::string& shader) {
87 shader_cache_count_++; 89 shader_cache_count_++;
88 shader_cache_shader_ = shader; 90 shader_cache_shader_ = shader;
89 } 91 }
90 92
91 int32_t shader_cache_count() { return shader_cache_count_; } 93 int32_t shader_cache_count() { return shader_cache_count_; }
92 const std::string& shader_cache_shader() { return shader_cache_shader_; } 94 const std::string& shader_cache_shader() { return shader_cache_shader_; }
93 95
94 protected: 96 protected:
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 fragment_shader_, 686 fragment_shader_,
685 NULL, 687 NULL,
686 varyings_, 688 varyings_,
687 GL_NONE, 689 GL_NONE,
688 base::Bind(&MemoryProgramCacheTest::ShaderCacheCb, 690 base::Bind(&MemoryProgramCacheTest::ShaderCacheCb,
689 base::Unretained(this)))); 691 base::Unretained(this))));
690 } 692 }
691 693
692 } // namespace gles2 694 } // namespace gles2
693 } // namespace gpu 695 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698