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 #include "gpu/command_buffer/service/in_process_command_buffer.h" | 5 #include "gpu/command_buffer/service/in_process_command_buffer.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 completion->Signal(); | 55 completion->Signal(); |
56 } | 56 } |
57 | 57 |
58 class GpuInProcessThread | 58 class GpuInProcessThread |
59 : public base::Thread, | 59 : public base::Thread, |
60 public InProcessCommandBuffer::Service, | 60 public InProcessCommandBuffer::Service, |
61 public base::RefCountedThreadSafe<GpuInProcessThread> { | 61 public base::RefCountedThreadSafe<GpuInProcessThread> { |
62 public: | 62 public: |
63 GpuInProcessThread(); | 63 GpuInProcessThread(); |
64 | 64 |
65 virtual void AddRef() const override { | 65 void AddRef() const override { |
66 base::RefCountedThreadSafe<GpuInProcessThread>::AddRef(); | 66 base::RefCountedThreadSafe<GpuInProcessThread>::AddRef(); |
67 } | 67 } |
68 virtual void Release() const override { | 68 void Release() const override { |
69 base::RefCountedThreadSafe<GpuInProcessThread>::Release(); | 69 base::RefCountedThreadSafe<GpuInProcessThread>::Release(); |
70 } | 70 } |
71 | 71 |
72 virtual void ScheduleTask(const base::Closure& task) override; | 72 void ScheduleTask(const base::Closure& task) override; |
73 virtual void ScheduleIdleWork(const base::Closure& callback) override; | 73 void ScheduleIdleWork(const base::Closure& callback) override; |
74 virtual bool UseVirtualizedGLContexts() override { return false; } | 74 bool UseVirtualizedGLContexts() override { return false; } |
75 virtual scoped_refptr<gles2::ShaderTranslatorCache> shader_translator_cache() | 75 scoped_refptr<gles2::ShaderTranslatorCache> shader_translator_cache() |
76 override; | 76 override; |
77 | 77 |
78 private: | 78 private: |
79 virtual ~GpuInProcessThread(); | 79 ~GpuInProcessThread() override; |
80 friend class base::RefCountedThreadSafe<GpuInProcessThread>; | 80 friend class base::RefCountedThreadSafe<GpuInProcessThread>; |
81 | 81 |
82 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; | 82 scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_; |
83 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); | 83 DISALLOW_COPY_AND_ASSIGN(GpuInProcessThread); |
84 }; | 84 }; |
85 | 85 |
86 GpuInProcessThread::GpuInProcessThread() : base::Thread("GpuThread") { | 86 GpuInProcessThread::GpuInProcessThread() : base::Thread("GpuThread") { |
87 Start(); | 87 Start(); |
88 } | 88 } |
89 | 89 |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 | 778 |
779 #if defined(OS_ANDROID) | 779 #if defined(OS_ANDROID) |
780 scoped_refptr<gfx::SurfaceTexture> | 780 scoped_refptr<gfx::SurfaceTexture> |
781 InProcessCommandBuffer::GetSurfaceTexture(uint32 stream_id) { | 781 InProcessCommandBuffer::GetSurfaceTexture(uint32 stream_id) { |
782 DCHECK(stream_texture_manager_); | 782 DCHECK(stream_texture_manager_); |
783 return stream_texture_manager_->GetSurfaceTexture(stream_id); | 783 return stream_texture_manager_->GetSurfaceTexture(stream_id); |
784 } | 784 } |
785 #endif | 785 #endif |
786 | 786 |
787 } // namespace gpu | 787 } // namespace gpu |
OLD | NEW |