Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/synchronization/waitable_event.h" | 13 #include "base/synchronization/waitable_event.h" |
| 14 #include "base/threading/thread.h" | |
| 14 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 15 #include "media/filters/gpu_video_accelerator_factories.h" | 16 #include "media/filters/gpu_video_accelerator_factories.h" |
| 16 #include "third_party/skia/include/core/SkBitmap.h" | 17 #include "third_party/skia/include/core/SkBitmap.h" |
| 17 #include "ui/gfx/size.h" | 18 #include "ui/gfx/size.h" |
| 18 | 19 |
| 19 namespace base { | 20 namespace base { |
| 20 class MessageLoopProxy; | 21 class MessageLoopProxy; |
| 21 class WaitableEvent; | 22 class WaitableEvent; |
| 22 } | 23 } |
| 23 | 24 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 // function. | 135 // function. |
| 135 scoped_ptr<base::SharedMemory> shared_memory_segment_; | 136 scoped_ptr<base::SharedMemory> shared_memory_segment_; |
| 136 | 137 |
| 137 // Bitmap returned by ReadPixels(). | 138 // Bitmap returned by ReadPixels(). |
| 138 SkBitmap read_pixels_bitmap_; | 139 SkBitmap read_pixels_bitmap_; |
| 139 | 140 |
| 140 // Textures returned by the CreateTexture() function. | 141 // Textures returned by the CreateTexture() function. |
| 141 std::vector<uint32> created_textures_; | 142 std::vector<uint32> created_textures_; |
| 142 std::vector<gpu::Mailbox> created_texture_mailboxes_; | 143 std::vector<gpu::Mailbox> created_texture_mailboxes_; |
| 143 | 144 |
| 145 // Renderer thread designated solely to allocate shared memory on. We hide on | |
| 146 // it from webrtc to avoid all kinds of deadlocks of varying complexity, which | |
| 147 // we would randomly end up in if we wanted to allocate shared memory on the | |
| 148 // renderer's ChildThread, as webrtc likes to sleep on it while calling into | |
| 149 // encoder via a varying number of indirections and/or while holding critical | |
| 150 // sections. | |
| 151 // The thread is owned by the original factories, while the proxy is shared | |
| 152 // by all clones. | |
| 153 scoped_ptr<base::Thread> shm_alloc_thread_; | |
|
Ami GONE FROM CHROMIUM
2013/09/04 20:47:56
Previously you said that "the original factories o
| |
| 154 scoped_refptr<base::MessageLoopProxy> shm_alloc_message_loop_; | |
| 155 | |
| 144 DISALLOW_COPY_AND_ASSIGN(RendererGpuVideoAcceleratorFactories); | 156 DISALLOW_COPY_AND_ASSIGN(RendererGpuVideoAcceleratorFactories); |
| 145 }; | 157 }; |
| 146 | 158 |
| 147 } // namespace content | 159 } // namespace content |
| 148 | 160 |
| 149 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 161 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
| OLD | NEW |