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

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

Issue 16175005: GPU: Replace AsyncPixelTransferState with AsyncPixelTransferDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 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 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_SYNC_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_SYNC_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_SYNC_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_SYNC_H_
7 7
8 #include "gpu/command_buffer/service/async_pixel_transfer_manager.h" 8 #include "gpu/command_buffer/service/async_pixel_transfer_manager.h"
9 9
10 namespace gpu { 10 namespace gpu {
11 class AsyncPixelTransferDelegateSync;
12 11
13 class AsyncPixelTransferManagerSync : public AsyncPixelTransferManager { 12 class AsyncPixelTransferManagerSync : public AsyncPixelTransferManager {
14 public: 13 public:
15 AsyncPixelTransferManagerSync(); 14 AsyncPixelTransferManagerSync();
16 virtual ~AsyncPixelTransferManagerSync(); 15 virtual ~AsyncPixelTransferManagerSync();
17 16
18 // AsyncPixelTransferManager implementation: 17 // AsyncPixelTransferManager implementation:
19 virtual void BindCompletedAsyncTransfers() OVERRIDE; 18 virtual void BindCompletedAsyncTransfers() OVERRIDE;
20 virtual void AsyncNotifyCompletion( 19 virtual void AsyncNotifyCompletion(
21 const AsyncMemoryParams& mem_params, 20 const AsyncMemoryParams& mem_params,
22 const CompletionCallback& callback) OVERRIDE; 21 const CompletionCallback& callback) OVERRIDE;
23 virtual uint32 GetTextureUploadCount() OVERRIDE; 22 virtual uint32 GetTextureUploadCount() OVERRIDE;
24 virtual base::TimeDelta GetTotalTextureUploadTime() OVERRIDE; 23 virtual base::TimeDelta GetTotalTextureUploadTime() OVERRIDE;
25 virtual void ProcessMorePendingTransfers() OVERRIDE; 24 virtual void ProcessMorePendingTransfers() OVERRIDE;
26 virtual bool NeedsProcessMorePendingTransfers() OVERRIDE; 25 virtual bool NeedsProcessMorePendingTransfers() OVERRIDE;
27 virtual AsyncPixelTransferDelegate* GetAsyncPixelTransferDelegate() OVERRIDE;
28 26
29 // State shared between Managers and Delegates. 27 // State shared between Managers and Delegates.
30 struct SharedState { 28 struct SharedState {
31 SharedState(); 29 SharedState();
32 ~SharedState(); 30 ~SharedState();
33 31
34 int texture_upload_count; 32 int texture_upload_count;
35 base::TimeDelta total_texture_upload_time; 33 base::TimeDelta total_texture_upload_time;
36 }; 34 };
37 35
38 private: 36 private:
37 // AsyncPixelTransferManager implementation:
38 virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl(
39 gles2::TextureRef* ref,
40 const AsyncTexImage2DParams& define_params) OVERRIDE;
41
39 SharedState shared_state_; 42 SharedState shared_state_;
40 scoped_ptr<AsyncPixelTransferDelegateSync> delegate_;
41 43
42 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManagerSync); 44 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManagerSync);
43 }; 45 };
44 46
45 } // namespace gpu 47 } // namespace gpu
46 48
47 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_SYNC_H_ 49 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_SYNC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698