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

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

Issue 116863003: gpu: Reuse transfer buffers more aggresively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: [WIP] Introduced internal SetAsyncToken command buffer command Created 6 years, 11 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 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 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 public: 56 public:
57 static AsyncPixelTransferManager* Create(gfx::GLContext* context); 57 static AsyncPixelTransferManager* Create(gfx::GLContext* context);
58 58
59 virtual ~AsyncPixelTransferManager(); 59 virtual ~AsyncPixelTransferManager();
60 60
61 void Initialize(gles2::TextureManager* texture_manager); 61 void Initialize(gles2::TextureManager* texture_manager);
62 62
63 virtual void BindCompletedAsyncTransfers() = 0; 63 virtual void BindCompletedAsyncTransfers() = 0;
64 64
65 // There's no guarantee that callback will run on the caller thread. 65 // There's no guarantee that callback will run on the caller thread.
66 virtual void AsyncRunWhenCompleted(base::Callback<void()> callback) = 0;
reveman 2014/01/22 17:30:04 Can you drop "When" from this somehow? "Async" pre
epenner 2014/01/23 02:26:12 This is very similar to AsyncNotifyCompletion both
67
68 // There's no guarantee that callback will run on the caller thread.
66 virtual void AsyncNotifyCompletion( 69 virtual void AsyncNotifyCompletion(
67 const AsyncMemoryParams& mem_params, 70 const AsyncMemoryParams& mem_params,
68 AsyncPixelTransferCompletionObserver* observer) = 0; 71 AsyncPixelTransferCompletionObserver* observer) = 0;
69 72
70 virtual uint32 GetTextureUploadCount() = 0; 73 virtual uint32 GetTextureUploadCount() = 0;
71 virtual base::TimeDelta GetTotalTextureUploadTime() = 0; 74 virtual base::TimeDelta GetTotalTextureUploadTime() = 0;
72 75
73 // ProcessMorePendingTransfers() will be called at a good time 76 // ProcessMorePendingTransfers() will be called at a good time
74 // to process a small amount of pending transfer work while 77 // to process a small amount of pending transfer work while
75 // NeedsProcessMorePendingTransfers() returns true. Implementations 78 // NeedsProcessMorePendingTransfers() returns true. Implementations
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl( 113 virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl(
111 gles2::TextureRef* ref, 114 gles2::TextureRef* ref,
112 const AsyncTexImage2DParams& define_params) = 0; 115 const AsyncTexImage2DParams& define_params) = 0;
113 116
114 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManager); 117 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManager);
115 }; 118 };
116 119
117 } // namespace gpu 120 } // namespace gpu
118 121
119 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_H_ 122 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698