Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / gpu / command_buffer / service / async_pixel_transfer_manager_stub.cc
blobd5f96b03b73460c1073561812b7f96a2f54abfa4
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"
9 namespace gpu {
11 class AsyncPixelTransferDelegateStub : public AsyncPixelTransferDelegate {
12 public:
13 AsyncPixelTransferDelegateStub();
14 virtual ~AsyncPixelTransferDelegateStub();
16 // Implement AsyncPixelTransferDelegate:
17 virtual void AsyncTexImage2D(
18 const AsyncTexImage2DParams& tex_params,
19 const AsyncMemoryParams& mem_params,
20 const base::Closure& bind_callback) OVERRIDE;
21 virtual void AsyncTexSubImage2D(
22 const AsyncTexSubImage2DParams& tex_params,
23 const AsyncMemoryParams& mem_params) OVERRIDE;
24 virtual bool TransferIsInProgress() OVERRIDE;
25 virtual void WaitForTransferCompletion() OVERRIDE;
27 private:
28 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegateStub);
31 AsyncPixelTransferDelegateStub::AsyncPixelTransferDelegateStub() {}
33 AsyncPixelTransferDelegateStub::~AsyncPixelTransferDelegateStub() {}
35 void AsyncPixelTransferDelegateStub::AsyncTexImage2D(
36 const AsyncTexImage2DParams& tex_params,
37 const AsyncMemoryParams& mem_params,
38 const base::Closure& bind_callback) {
39 bind_callback.Run();
42 void AsyncPixelTransferDelegateStub::AsyncTexSubImage2D(
43 const AsyncTexSubImage2DParams& tex_params,
44 const AsyncMemoryParams& mem_params) {
47 bool AsyncPixelTransferDelegateStub::TransferIsInProgress() {
48 return false;
51 void AsyncPixelTransferDelegateStub::WaitForTransferCompletion() {}
53 AsyncPixelTransferManagerStub::AsyncPixelTransferManagerStub() {}
55 AsyncPixelTransferManagerStub::~AsyncPixelTransferManagerStub() {}
57 void AsyncPixelTransferManagerStub::BindCompletedAsyncTransfers() {
60 void AsyncPixelTransferManagerStub::AsyncNotifyCompletion(
61 const AsyncMemoryParams& mem_params,
62 AsyncPixelTransferCompletionObserver* observer) {
63 observer->DidComplete(mem_params);
66 uint32 AsyncPixelTransferManagerStub::GetTextureUploadCount() {
67 return 0;
70 base::TimeDelta AsyncPixelTransferManagerStub::GetTotalTextureUploadTime() {
71 return base::TimeDelta();
74 void AsyncPixelTransferManagerStub::ProcessMorePendingTransfers() {
77 bool AsyncPixelTransferManagerStub::NeedsProcessMorePendingTransfers() {
78 return false;
81 void AsyncPixelTransferManagerStub::WaitAllAsyncTexImage2D() {
84 AsyncPixelTransferDelegate*
85 AsyncPixelTransferManagerStub::CreatePixelTransferDelegateImpl(
86 gles2::TextureRef* ref,
87 const AsyncTexImage2DParams& define_params) {
88 return new AsyncPixelTransferDelegateStub();
91 } // namespace gpu