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

Side by Side Diff: ui/gl/async_pixel_transfer_delegate.h

Issue 12040049: gpu: Implement idle async pixel transfers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase and prevent starvation Created 7 years, 9 months 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 UI_GL_ASYNC_TASK_DELEGATE_H_ 5 #ifndef UI_GL_ASYNC_TASK_DELEGATE_H_
6 #define UI_GL_ASYNC_TASK_DELEGATE_H_ 6 #define UI_GL_ASYNC_TASK_DELEGATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 const AsyncTexSubImage2DParams& tex_params, 106 const AsyncTexSubImage2DParams& tex_params,
107 const AsyncMemoryParams& mem_params) = 0; 107 const AsyncMemoryParams& mem_params) = 0;
108 108
109 // Block until the specified transfer completes. 109 // Block until the specified transfer completes.
110 virtual void WaitForTransferCompletion( 110 virtual void WaitForTransferCompletion(
111 AsyncPixelTransferState* state) = 0; 111 AsyncPixelTransferState* state) = 0;
112 112
113 virtual uint32 GetTextureUploadCount() = 0; 113 virtual uint32 GetTextureUploadCount() = 0;
114 virtual base::TimeDelta GetTotalTextureUploadTime() = 0; 114 virtual base::TimeDelta GetTotalTextureUploadTime() = 0;
115 115
116 virtual void ProcessPendingTransfers() = 0;
Sami 2013/03/07 16:57:19 Can we name these somehow so that the distinction
reveman 2013/03/07 20:21:04 I agree.
117 virtual bool HasPendingTransfers() = 0;
118
116 protected: 119 protected:
117 AsyncPixelTransferDelegate() {} 120 AsyncPixelTransferDelegate() {}
118 // For testing, as returning scoped_ptr wouldn't work with MOCK_METHOD. 121 // For testing, as returning scoped_ptr wouldn't work with MOCK_METHOD.
119 virtual AsyncPixelTransferState* 122 virtual AsyncPixelTransferState*
120 CreateRawPixelTransferState(GLuint texture_id) = 0; 123 CreateRawPixelTransferState(GLuint texture_id) = 0;
121 124
122 private: 125 private:
123 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegate); 126 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegate);
124 }; 127 };
125 128
126 } // namespace gfx 129 } // namespace gfx
127 130
128 #endif // UI_GL_ASYNC_TASK_DELEGATE_H_ 131 #endif // UI_GL_ASYNC_TASK_DELEGATE_H_
129 132
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698