| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GPU_SCHEDULER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ |
| 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/shared_memory.h" | 15 #include "base/shared_memory.h" |
| 16 #include "base/task.h" | 16 #include "base/task.h" |
| 17 #include "gpu/command_buffer/common/command_buffer.h" | 17 #include "gpu/command_buffer/common/command_buffer.h" |
| 18 #include "gpu/command_buffer/common/constants.h" | |
| 19 #include "gpu/command_buffer/service/cmd_buffer_engine.h" | 18 #include "gpu/command_buffer/service/cmd_buffer_engine.h" |
| 20 #include "gpu/command_buffer/service/cmd_parser.h" | 19 #include "gpu/command_buffer/service/cmd_parser.h" |
| 21 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 20 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 22 #include "ui/gfx/native_widget_types.h" | 21 #include "ui/gfx/native_widget_types.h" |
| 23 #include "ui/gfx/size.h" | 22 #include "ui/gfx/size.h" |
| 24 #include "ui/gfx/surface/transport_dib.h" | 23 #include "ui/gfx/surface/transport_dib.h" |
| 25 | 24 |
| 26 #if defined(OS_MACOSX) | 25 #if defined(OS_MACOSX) |
| 27 #include "ui/gfx/surface/accelerated_surface_mac.h" | 26 #include "ui/gfx/surface/accelerated_surface_mac.h" |
| 28 #endif | 27 #endif |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 const scoped_refptr<gfx::GLSurface>& surface, | 68 const scoped_refptr<gfx::GLSurface>& surface, |
| 70 const scoped_refptr<gfx::GLContext>& context, | 69 const scoped_refptr<gfx::GLContext>& context, |
| 71 const gfx::Size& size, | 70 const gfx::Size& size, |
| 72 const gles2::DisallowedExtensions& disallowed_extensions, | 71 const gles2::DisallowedExtensions& disallowed_extensions, |
| 73 const char* allowed_extensions, | 72 const char* allowed_extensions, |
| 74 const std::vector<int32>& attribs); | 73 const std::vector<int32>& attribs); |
| 75 | 74 |
| 76 void Destroy(); | 75 void Destroy(); |
| 77 void DestroyCommon(); | 76 void DestroyCommon(); |
| 78 | 77 |
| 79 bool MapExternalResource(resource_type::ResourceType resource_type, | |
| 80 uint32 resource_source_id, | |
| 81 GpuScheduler* source_scheduler, | |
| 82 uint32 resource_dest_id); | |
| 83 | |
| 84 bool SetParent(GpuScheduler* parent_scheduler, uint32 parent_texture_id); | 78 bool SetParent(GpuScheduler* parent_scheduler, uint32 parent_texture_id); |
| 85 | 79 |
| 86 void PutChanged(); | 80 void PutChanged(); |
| 87 | 81 |
| 88 // Sets whether commands should be processed by this scheduler. Setting to | 82 // Sets whether commands should be processed by this scheduler. Setting to |
| 89 // false unschedules. Setting to true reschedules. Whether or not the | 83 // false unschedules. Setting to true reschedules. Whether or not the |
| 90 // scheduler is currently scheduled is "reference counted". Every call with | 84 // scheduler is currently scheduled is "reference counted". Every call with |
| 91 // false must eventually be paired by a call with true. | 85 // false must eventually be paired by a call with true. |
| 92 void SetScheduled(bool is_scheduled); | 86 void SetScheduled(bool is_scheduled); |
| 93 | 87 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 #endif | 176 #endif |
| 183 | 177 |
| 184 ScopedRunnableMethodFactory<GpuScheduler> method_factory_; | 178 ScopedRunnableMethodFactory<GpuScheduler> method_factory_; |
| 185 scoped_ptr<Callback0::Type> wrapped_swap_buffers_callback_; | 179 scoped_ptr<Callback0::Type> wrapped_swap_buffers_callback_; |
| 186 scoped_ptr<Callback0::Type> command_processed_callback_; | 180 scoped_ptr<Callback0::Type> command_processed_callback_; |
| 187 }; | 181 }; |
| 188 | 182 |
| 189 } // namespace gpu | 183 } // namespace gpu |
| 190 | 184 |
| 191 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ | 185 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ |
| OLD | NEW |