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
3 // found in the LICENSE file.
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_SYNC_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_SYNC_H_
8 #include "gpu/command_buffer/service/async_pixel_transfer_manager.h"
12 class AsyncPixelTransferManagerSync
: public AsyncPixelTransferManager
{
14 AsyncPixelTransferManagerSync();
15 ~AsyncPixelTransferManagerSync() override
;
17 // AsyncPixelTransferManager implementation:
18 void BindCompletedAsyncTransfers() override
;
19 void AsyncNotifyCompletion(
20 const AsyncMemoryParams
& mem_params
,
21 AsyncPixelTransferCompletionObserver
* observer
) override
;
22 uint32
GetTextureUploadCount() override
;
23 base::TimeDelta
GetTotalTextureUploadTime() override
;
24 void ProcessMorePendingTransfers() override
;
25 bool NeedsProcessMorePendingTransfers() override
;
26 void WaitAllAsyncTexImage2D() override
;
28 // State shared between Managers and Delegates.
33 int texture_upload_count
;
34 base::TimeDelta total_texture_upload_time
;
38 // AsyncPixelTransferManager implementation:
39 AsyncPixelTransferDelegate
* CreatePixelTransferDelegateImpl(
40 gles2::TextureRef
* ref
,
41 const AsyncTexImage2DParams
& define_params
) override
;
43 SharedState shared_state_
;
45 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManagerSync
);
50 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_SYNC_H_