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

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

Issue 12210129: gpu: Add the ability to wait on upload completion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix logging. 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
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 virtual void AsyncTexImage2D( 99 virtual void AsyncTexImage2D(
100 AsyncPixelTransferState* state, 100 AsyncPixelTransferState* state,
101 const AsyncTexImage2DParams& tex_params, 101 const AsyncTexImage2DParams& tex_params,
102 const AsyncMemoryParams& mem_params) = 0; 102 const AsyncMemoryParams& mem_params) = 0;
103 103
104 virtual void AsyncTexSubImage2D( 104 virtual void AsyncTexSubImage2D(
105 AsyncPixelTransferState* state, 105 AsyncPixelTransferState* state,
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.
110 virtual void WaitForTransferCompletion(
111 AsyncPixelTransferState* state) = 0;
112
109 virtual uint32 GetTextureUploadCount() = 0; 113 virtual uint32 GetTextureUploadCount() = 0;
110 virtual base::TimeDelta GetTotalTextureUploadTime() = 0; 114 virtual base::TimeDelta GetTotalTextureUploadTime() = 0;
111 115
112 protected: 116 protected:
113 AsyncPixelTransferDelegate() {} 117 AsyncPixelTransferDelegate() {}
114 // For testing, as returning scoped_ptr wouldn't work with MOCK_METHOD. 118 // For testing, as returning scoped_ptr wouldn't work with MOCK_METHOD.
115 virtual AsyncPixelTransferState* 119 virtual AsyncPixelTransferState*
116 CreateRawPixelTransferState(GLuint texture_id) = 0; 120 CreateRawPixelTransferState(GLuint texture_id) = 0;
117 121
118 private: 122 private:
119 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegate); 123 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegate);
120 }; 124 };
121 125
122 } // namespace gfx 126 } // namespace gfx
123 127
124 #endif // UI_GL_ASYNC_TASK_DELEGATE_H_ 128 #endif // UI_GL_ASYNC_TASK_DELEGATE_H_
125 129
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h ('k') | ui/gl/async_pixel_transfer_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698