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

Side by Side Diff: gpu/command_buffer/service/context_group.h

Issue 2814583002: Service/ClientDiscardableManager (Closed)
Patch Set: rebase Created 3 years, 7 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
« no previous file with comments | « gpu/command_buffer/service/BUILD.gn ('k') | gpu/command_buffer/service/context_group.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 11 matching lines...) Expand all
22 #include "gpu/command_buffer/service/gpu_preferences.h" 22 #include "gpu/command_buffer/service/gpu_preferences.h"
23 #include "gpu/command_buffer/service/shader_translator_cache.h" 23 #include "gpu/command_buffer/service/shader_translator_cache.h"
24 #include "gpu/config/gpu_feature_info.h" 24 #include "gpu/config/gpu_feature_info.h"
25 #include "gpu/gpu_export.h" 25 #include "gpu/gpu_export.h"
26 26
27 namespace gpu { 27 namespace gpu {
28 28
29 class ImageFactory; 29 class ImageFactory;
30 struct GpuPreferences; 30 struct GpuPreferences;
31 class TransferBufferManager; 31 class TransferBufferManager;
32 class ServiceDiscardableManager;
32 33
33 namespace gles2 { 34 namespace gles2 {
34 35
35 class ProgramCache; 36 class ProgramCache;
36 class BufferManager; 37 class BufferManager;
37 class GLES2Decoder; 38 class GLES2Decoder;
38 class MailboxManager; 39 class MailboxManager;
39 class RenderbufferManager; 40 class RenderbufferManager;
40 class PathManager; 41 class PathManager;
41 class ProgramManager; 42 class ProgramManager;
(...skipping 17 matching lines...) Expand all
59 const GpuPreferences& gpu_preferences, 60 const GpuPreferences& gpu_preferences,
60 const scoped_refptr<MailboxManager>& mailbox_manager, 61 const scoped_refptr<MailboxManager>& mailbox_manager,
61 const scoped_refptr<MemoryTracker>& memory_tracker, 62 const scoped_refptr<MemoryTracker>& memory_tracker,
62 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, 63 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache,
63 const scoped_refptr<FramebufferCompletenessCache>& 64 const scoped_refptr<FramebufferCompletenessCache>&
64 framebuffer_completeness_cache, 65 framebuffer_completeness_cache,
65 const scoped_refptr<FeatureInfo>& feature_info, 66 const scoped_refptr<FeatureInfo>& feature_info,
66 bool bind_generates_resource, 67 bool bind_generates_resource,
67 gpu::ImageFactory* image_factory, 68 gpu::ImageFactory* image_factory,
68 ProgressReporter* progress_reporter, 69 ProgressReporter* progress_reporter,
69 const GpuFeatureInfo& gpu_feature_info); 70 const GpuFeatureInfo& gpu_feature_info,
71 ServiceDiscardableManager* discardable_manager);
70 72
71 // This should only be called by GLES2Decoder. This must be paired with a 73 // This should only be called by GLES2Decoder. This must be paired with a
72 // call to destroy if it succeeds. 74 // call to destroy if it succeeds.
73 bool Initialize( 75 bool Initialize(
74 GLES2Decoder* decoder, 76 GLES2Decoder* decoder,
75 ContextType context_type, 77 ContextType context_type,
76 const DisallowedFeatures& disallowed_features); 78 const DisallowedFeatures& disallowed_features);
77 79
78 // Destroys all the resources when called for the last context in the group. 80 // Destroys all the resources when called for the last context in the group.
79 // It should only be called by GLES2Decoder. 81 // It should only be called by GLES2Decoder.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 194 }
193 195
194 TransferBufferManager* transfer_buffer_manager() const { 196 TransferBufferManager* transfer_buffer_manager() const {
195 return transfer_buffer_manager_.get(); 197 return transfer_buffer_manager_.get();
196 } 198 }
197 199
198 SamplerManager* sampler_manager() const { 200 SamplerManager* sampler_manager() const {
199 return sampler_manager_.get(); 201 return sampler_manager_.get();
200 } 202 }
201 203
204 ServiceDiscardableManager* discardable_manager() const {
205 return discardable_manager_;
206 }
207
202 uint32_t GetMemRepresented() const; 208 uint32_t GetMemRepresented() const;
203 209
204 // Loses all the context associated with this group. 210 // Loses all the context associated with this group.
205 void LoseContexts(error::ContextLostReason reason); 211 void LoseContexts(error::ContextLostReason reason);
206 212
207 bool GetBufferServiceId(GLuint client_id, GLuint* service_id) const; 213 bool GetBufferServiceId(GLuint client_id, GLuint* service_id) const;
208 214
209 void AddSyncId(GLuint client_id, GLsync service_id) { 215 void AddSyncId(GLuint client_id, GLsync service_id) {
210 syncs_id_map_[client_id] = service_id; 216 syncs_id_map_[client_id] = service_id;
211 } 217 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 304
299 std::unique_ptr<PassthroughResources> passthrough_resources_; 305 std::unique_ptr<PassthroughResources> passthrough_resources_;
300 306
301 // Used to notify the watchdog thread of progress during destruction, 307 // Used to notify the watchdog thread of progress during destruction,
302 // preventing time-outs when destruction takes a long time. May be null when 308 // preventing time-outs when destruction takes a long time. May be null when
303 // using in-process command buffer. 309 // using in-process command buffer.
304 ProgressReporter* progress_reporter_; 310 ProgressReporter* progress_reporter_;
305 311
306 GpuFeatureInfo gpu_feature_info_; 312 GpuFeatureInfo gpu_feature_info_;
307 313
314 ServiceDiscardableManager* discardable_manager_;
315
308 DISALLOW_COPY_AND_ASSIGN(ContextGroup); 316 DISALLOW_COPY_AND_ASSIGN(ContextGroup);
309 }; 317 };
310 318
311 } // namespace gles2 319 } // namespace gles2
312 } // namespace gpu 320 } // namespace gpu
313 321
314 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 322 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/BUILD.gn ('k') | gpu/command_buffer/service/context_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698