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

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

Issue 2378583003: Ping watchdog thread during GpuChannel destruction (Closed)
Patch Set: feedback 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 #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 21 matching lines...) Expand all
32 namespace gles2 { 32 namespace gles2 {
33 33
34 class ProgramCache; 34 class ProgramCache;
35 class BufferManager; 35 class BufferManager;
36 class GLES2Decoder; 36 class GLES2Decoder;
37 class FramebufferManager; 37 class FramebufferManager;
38 class MailboxManager; 38 class MailboxManager;
39 class RenderbufferManager; 39 class RenderbufferManager;
40 class PathManager; 40 class PathManager;
41 class ProgramManager; 41 class ProgramManager;
42 class ProgressReporter;
42 class SamplerManager; 43 class SamplerManager;
43 class ShaderManager; 44 class ShaderManager;
44 class TextureManager; 45 class TextureManager;
45 class MemoryTracker; 46 class MemoryTracker;
46 struct DisallowedFeatures; 47 struct DisallowedFeatures;
47 struct PassthroughResources; 48 struct PassthroughResources;
48 49
49 // A Context Group helps manage multiple GLES2Decoders that share 50 // A Context Group helps manage multiple GLES2Decoders that share
50 // resources. 51 // resources.
51 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> { 52 class GPU_EXPORT ContextGroup : public base::RefCounted<ContextGroup> {
52 public: 53 public:
53 ContextGroup( 54 ContextGroup(
54 const GpuPreferences& gpu_preferences, 55 const GpuPreferences& gpu_preferences,
55 const scoped_refptr<MailboxManager>& mailbox_manager, 56 const scoped_refptr<MailboxManager>& mailbox_manager,
56 const scoped_refptr<MemoryTracker>& memory_tracker, 57 const scoped_refptr<MemoryTracker>& memory_tracker,
57 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache, 58 const scoped_refptr<ShaderTranslatorCache>& shader_translator_cache,
58 const scoped_refptr<FramebufferCompletenessCache>& 59 const scoped_refptr<FramebufferCompletenessCache>&
59 framebuffer_completeness_cache, 60 framebuffer_completeness_cache,
60 const scoped_refptr<FeatureInfo>& feature_info, 61 const scoped_refptr<FeatureInfo>& feature_info,
61 bool bind_generates_resource, 62 bool bind_generates_resource,
62 gpu::ImageFactory* image_factory); 63 gpu::ImageFactory* image_factory,
64 ProgressReporter* progress_reporter);
63 65
64 // This should only be called by GLES2Decoder. This must be paired with a 66 // This should only be called by GLES2Decoder. This must be paired with a
65 // call to destroy if it succeeds. 67 // call to destroy if it succeeds.
66 bool Initialize( 68 bool Initialize(
67 GLES2Decoder* decoder, 69 GLES2Decoder* decoder,
68 ContextType context_type, 70 ContextType context_type,
69 const DisallowedFeatures& disallowed_features); 71 const DisallowedFeatures& disallowed_features);
70 72
71 // Destroys all the resources when called for the last context in the group. 73 // Destroys all the resources when called for the last context in the group.
72 // It should only be called by GLES2Decoder. 74 // It should only be called by GLES2Decoder.
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 289
288 gpu::ImageFactory* image_factory_; 290 gpu::ImageFactory* image_factory_;
289 291
290 std::vector<base::WeakPtr<gles2::GLES2Decoder> > decoders_; 292 std::vector<base::WeakPtr<gles2::GLES2Decoder> > decoders_;
291 293
292 // Mappings from client side IDs to service side IDs. 294 // Mappings from client side IDs to service side IDs.
293 base::hash_map<GLuint, GLsync> syncs_id_map_; 295 base::hash_map<GLuint, GLsync> syncs_id_map_;
294 296
295 std::unique_ptr<PassthroughResources> passthrough_resources_; 297 std::unique_ptr<PassthroughResources> passthrough_resources_;
296 298
299 ProgressReporter* progress_reporter_;
300
297 DISALLOW_COPY_AND_ASSIGN(ContextGroup); 301 DISALLOW_COPY_AND_ASSIGN(ContextGroup);
298 }; 302 };
299 303
300 } // namespace gles2 304 } // namespace gles2
301 } // namespace gpu 305 } // namespace gpu
302 306
303 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_ 307 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_GROUP_H_
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/context_group.cc » ('j') | gpu/command_buffer/service/progress_reporter_stub.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698