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

Side by Side Diff: content/renderer/media/renderer_gpu_video_accelerator_factories.h

Issue 171773014: Move ContextProvider binding to inside GpuVideoAcceleratorFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 12dbef7e Rebase. Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
6 #define CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 6 #define CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 const gfx::Rect& visible_rect, 64 const gfx::Rect& visible_rect,
65 const SkBitmap& pixels) OVERRIDE; 65 const SkBitmap& pixels) OVERRIDE;
66 virtual base::SharedMemory* CreateSharedMemory(size_t size) OVERRIDE; 66 virtual base::SharedMemory* CreateSharedMemory(size_t size) OVERRIDE;
67 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() OVERRIDE; 67 virtual scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner() OVERRIDE;
68 68
69 protected: 69 protected:
70 friend class base::RefCountedThreadSafe<RendererGpuVideoAcceleratorFactories>; 70 friend class base::RefCountedThreadSafe<RendererGpuVideoAcceleratorFactories>;
71 virtual ~RendererGpuVideoAcceleratorFactories(); 71 virtual ~RendererGpuVideoAcceleratorFactories();
72 72
73 private: 73 private:
74 // Helper to bind |context_provider| to the |task_runner_| thread after
75 // construction.
76 void BindContext();
77
74 // Helper to get a pointer to the WebGraphicsContext3DCommandBufferImpl, 78 // Helper to get a pointer to the WebGraphicsContext3DCommandBufferImpl,
75 // if it has not been lost yet. 79 // if it has not been lost yet.
76 WebGraphicsContext3DCommandBufferImpl* GetContext3d(); 80 WebGraphicsContext3DCommandBufferImpl* GetContext3d();
77 81
78 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 82 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
79 scoped_refptr<GpuChannelHost> gpu_channel_host_; 83 scoped_refptr<GpuChannelHost> gpu_channel_host_;
80 scoped_refptr<ContextProviderCommandBuffer> context_provider_; 84 scoped_refptr<ContextProviderCommandBuffer> context_provider_;
81 85
82 // For sending requests to allocate shared memory in the Browser process. 86 // For sending requests to allocate shared memory in the Browser process.
83 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 87 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
84 88
85 DISALLOW_COPY_AND_ASSIGN(RendererGpuVideoAcceleratorFactories); 89 DISALLOW_COPY_AND_ASSIGN(RendererGpuVideoAcceleratorFactories);
86 }; 90 };
87 91
88 } // namespace content 92 } // namespace content
89 93
90 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ 94 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698