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

Unified Diff: gpu/command_buffer/service/context_group.h

Issue 1498033003: Implement SamplerManager in the command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more tweak from zmo@'s feedback Created 5 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
Index: gpu/command_buffer/service/context_group.h
diff --git a/gpu/command_buffer/service/context_group.h b/gpu/command_buffer/service/context_group.h
index ad2c5df0b19b3873d134a230008c31f5acd4fbf5..89d15ec02c06bd3c23e0e6e5484fa5ff578a5962 100644
--- a/gpu/command_buffer/service/context_group.h
+++ b/gpu/command_buffer/service/context_group.h
@@ -34,6 +34,7 @@ class MailboxManager;
class RenderbufferManager;
class PathManager;
class ProgramManager;
+class SamplerManager;
class ShaderManager;
class TextureManager;
class SubscriptionRefSet;
@@ -173,6 +174,10 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
return transfer_buffer_manager_.get();
}
+ SamplerManager* sampler_manager() const {
+ return sampler_manager_.get();
+ }
+
uint32 GetMemRepresented() const;
// Loses all the context associated with this group.
@@ -180,24 +185,6 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
bool GetBufferServiceId(GLuint client_id, GLuint* service_id) const;
- void AddSamplerId(GLuint client_id, GLuint service_id) {
- samplers_id_map_[client_id] = service_id;
- }
-
- bool GetSamplerServiceId(GLuint client_id, GLuint* service_id) const {
- base::hash_map<GLuint, GLuint>::const_iterator iter =
- samplers_id_map_.find(client_id);
- if (iter == samplers_id_map_.end())
- return false;
- if (service_id)
- *service_id = iter->second;
- return true;
- }
-
- void RemoveSamplerId(GLuint client_id) {
- samplers_id_map_.erase(client_id);
- }
-
void AddTransformFeedbackId(GLuint client_id, GLuint service_id) {
transformfeedbacks_id_map_[client_id] = service_id;
}
@@ -288,6 +275,8 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
scoped_ptr<ShaderManager> shader_manager_;
+ scoped_ptr<SamplerManager> sampler_manager_;
+
scoped_ptr<ValuebufferManager> valuebuffer_manager_;
scoped_refptr<FeatureInfo> feature_info_;
@@ -295,7 +284,6 @@ class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
std::vector<base::WeakPtr<gles2::GLES2Decoder> > decoders_;
// Mappings from client side IDs to service side IDs.
- base::hash_map<GLuint, GLuint> samplers_id_map_;
base::hash_map<GLuint, GLuint> transformfeedbacks_id_map_;
base::hash_map<GLuint, GLsync> syncs_id_map_;

Powered by Google App Engine
This is Rietveld 408576698