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 <utility> | 8 #include <utility> |
9 | 9 |
10 #include <GLES2/gl2.h> | 10 #include <GLES2/gl2.h> |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 completion->Signal(); | 53 completion->Signal(); |
54 } | 54 } |
55 | 55 |
56 class GpuInProcessThread | 56 class GpuInProcessThread |
57 : public base::Thread, | 57 : public base::Thread, |
58 public InProcessCommandBuffer::Service, | 58 public InProcessCommandBuffer::Service, |
59 public base::RefCountedThreadSafe<GpuInProcessThread> { | 59 public base::RefCountedThreadSafe<GpuInProcessThread> { |
60 public: | 60 public: |
61 GpuInProcessThread(); | 61 GpuInProcessThread(); |
62 | 62 |
63 virtual void AddRef() const { | 63 virtual void AddRef() const OVERRIDE { |
64 base::RefCountedThreadSafe<GpuInProcessThread>::AddRef(); | 64 base::RefCountedThreadSafe<GpuInProcessThread>::AddRef(); |
65 } | 65 } |
66 virtual void Release() const { | 66 virtual void Release() const OVERRIDE { |
67 base::RefCountedThreadSafe<GpuInProcessThread>::Release(); | 67 base::RefCountedThreadSafe<GpuInProcessThread>::Release(); |
68 } | 68 } |
69 | 69 |
70 virtual void ScheduleTask(const base::Closure& task) OVERRIDE; | 70 virtual void ScheduleTask(const base::Closure& task) OVERRIDE; |
71 virtual void ScheduleIdleWork(const base::Closure& callback) OVERRIDE; | 71 virtual void ScheduleIdleWork(const base::Closure& callback) OVERRIDE; |
72 virtual bool UseVirtualizedGLContexts() OVERRIDE { return false; } | 72 virtual bool UseVirtualizedGLContexts() OVERRIDE { return false; } |
73 | 73 |
74 private: | 74 private: |
75 virtual ~GpuInProcessThread(); | 75 virtual ~GpuInProcessThread(); |
76 friend class base::RefCountedThreadSafe<GpuInProcessThread>; | 76 friend class base::RefCountedThreadSafe<GpuInProcessThread>; |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 } | 672 } |
673 #endif | 673 #endif |
674 | 674 |
675 // static | 675 // static |
676 void InProcessCommandBuffer::SetGpuMemoryBufferFactory( | 676 void InProcessCommandBuffer::SetGpuMemoryBufferFactory( |
677 GpuMemoryBufferFactory* factory) { | 677 GpuMemoryBufferFactory* factory) { |
678 g_gpu_memory_buffer_factory = factory; | 678 g_gpu_memory_buffer_factory = factory; |
679 } | 679 } |
680 | 680 |
681 } // namespace gpu | 681 } // namespace gpu |
OLD | NEW |