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

Side by Side Diff: gpu/command_buffer/service/gpu_scheduler.h

Issue 8919014: Revert "Revert 113479 - Revert "Revert 113250 - Add CommandBuffer::SetGetBuffer"" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 (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 <queue> 8 #include <queue>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Returns whether the scheduler needs to be polled again in the future. 47 // Returns whether the scheduler needs to be polled again in the future.
48 bool HasMoreWork(); 48 bool HasMoreWork();
49 49
50 // Sets a callback that is invoked just before scheduler is rescheduled. 50 // Sets a callback that is invoked just before scheduler is rescheduled.
51 // Takes ownership of callback object. 51 // Takes ownership of callback object.
52 void SetScheduledCallback(const base::Closure& scheduled_callback); 52 void SetScheduledCallback(const base::Closure& scheduled_callback);
53 53
54 // Implementation of CommandBufferEngine. 54 // Implementation of CommandBufferEngine.
55 virtual Buffer GetSharedMemoryBuffer(int32 shm_id) OVERRIDE; 55 virtual Buffer GetSharedMemoryBuffer(int32 shm_id) OVERRIDE;
56 virtual void set_token(int32 token) OVERRIDE; 56 virtual void set_token(int32 token) OVERRIDE;
57 virtual bool SetGetBuffer(int32 transfer_buffer_id) OVERRIDE;
57 virtual bool SetGetOffset(int32 offset) OVERRIDE; 58 virtual bool SetGetOffset(int32 offset) OVERRIDE;
58 virtual int32 GetGetOffset() OVERRIDE; 59 virtual int32 GetGetOffset() OVERRIDE;
59 60
60 void SetCommandProcessedCallback(const base::Closure& callback); 61 void SetCommandProcessedCallback(const base::Closure& callback);
61 62
62 void DeferToFence(base::Closure task); 63 void DeferToFence(base::Closure task);
63 64
64 private: 65 private:
65 // Polls the fences, invoking callbacks that were waiting to be triggered 66 // Polls the fences, invoking callbacks that were waiting to be triggered
66 // by them and returns whether all fences were complete. 67 // by them and returns whether all fences were complete.
(...skipping 28 matching lines...) Expand all
95 }; 96 };
96 std::queue<UnscheduleFence> unschedule_fences_; 97 std::queue<UnscheduleFence> unschedule_fences_;
97 98
98 base::Closure scheduled_callback_; 99 base::Closure scheduled_callback_;
99 base::Closure command_processed_callback_; 100 base::Closure command_processed_callback_;
100 }; 101 };
101 102
102 } // namespace gpu 103 } // namespace gpu
103 104
104 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_ 105 #endif // GPU_COMMAND_BUFFER_SERVICE_GPU_SCHEDULER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h ('k') | gpu/command_buffer/service/gpu_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698