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 #include "gpu/command_buffer/service/async_pixel_transfer_manager_stub.h"
7 #include "gpu/command_buffer/service/async_pixel_transfer_delegate.h"
11 class AsyncPixelTransferDelegateStub
: public AsyncPixelTransferDelegate
{
13 AsyncPixelTransferDelegateStub();
14 ~AsyncPixelTransferDelegateStub() override
;
16 // Implement AsyncPixelTransferDelegate:
17 void AsyncTexImage2D(const AsyncTexImage2DParams
& tex_params
,
18 const AsyncMemoryParams
& mem_params
,
19 const base::Closure
& bind_callback
) override
;
20 void AsyncTexSubImage2D(const AsyncTexSubImage2DParams
& tex_params
,
21 const AsyncMemoryParams
& mem_params
) override
;
22 bool TransferIsInProgress() override
;
23 void WaitForTransferCompletion() override
;
26 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegateStub
);
29 AsyncPixelTransferDelegateStub::AsyncPixelTransferDelegateStub() {}
31 AsyncPixelTransferDelegateStub::~AsyncPixelTransferDelegateStub() {}
33 void AsyncPixelTransferDelegateStub::AsyncTexImage2D(
34 const AsyncTexImage2DParams
& tex_params
,
35 const AsyncMemoryParams
& mem_params
,
36 const base::Closure
& bind_callback
) {
40 void AsyncPixelTransferDelegateStub::AsyncTexSubImage2D(
41 const AsyncTexSubImage2DParams
& tex_params
,
42 const AsyncMemoryParams
& mem_params
) {
45 bool AsyncPixelTransferDelegateStub::TransferIsInProgress() {
49 void AsyncPixelTransferDelegateStub::WaitForTransferCompletion() {}
51 AsyncPixelTransferManagerStub::AsyncPixelTransferManagerStub() {}
53 AsyncPixelTransferManagerStub::~AsyncPixelTransferManagerStub() {}
55 void AsyncPixelTransferManagerStub::BindCompletedAsyncTransfers() {
58 void AsyncPixelTransferManagerStub::AsyncNotifyCompletion(
59 const AsyncMemoryParams
& mem_params
,
60 AsyncPixelTransferCompletionObserver
* observer
) {
61 observer
->DidComplete(mem_params
);
64 uint32
AsyncPixelTransferManagerStub::GetTextureUploadCount() {
68 base::TimeDelta
AsyncPixelTransferManagerStub::GetTotalTextureUploadTime() {
69 return base::TimeDelta();
72 void AsyncPixelTransferManagerStub::ProcessMorePendingTransfers() {
75 bool AsyncPixelTransferManagerStub::NeedsProcessMorePendingTransfers() {
79 void AsyncPixelTransferManagerStub::WaitAllAsyncTexImage2D() {
82 AsyncPixelTransferDelegate
*
83 AsyncPixelTransferManagerStub::CreatePixelTransferDelegateImpl(
84 gles2::TextureRef
* ref
,
85 const AsyncTexImage2DParams
& define_params
) {
86 return new AsyncPixelTransferDelegateStub();