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. 4 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_TEST_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_TEST_H_ 7 8 #include "gpu/command_buffer/service/async_pixel_transfer_manager.h" 9 #include "testing/gmock/include/gmock/gmock.h" 10 11 namespace gpu { 12 13 class MockAsyncPixelTransferManager : public AsyncPixelTransferManager { 14 public: 15 MockAsyncPixelTransferManager(); 16 virtual ~MockAsyncPixelTransferManager(); 17 18 // AsyncPixelTransferManager implementation: 19 MOCK_METHOD0(BindCompletedAsyncTransfers, void()); 20 MOCK_METHOD2(AsyncNotifyCompletion, 21 void(const AsyncMemoryParams& mem_params, 22 AsyncPixelTransferCompletionObserver* observer)); 23 MOCK_METHOD0(GetTextureUploadCount, uint32()); 24 MOCK_METHOD0(GetTotalTextureUploadTime, base::TimeDelta()); 25 MOCK_METHOD0(ProcessMorePendingTransfers, void()); 26 MOCK_METHOD0(NeedsProcessMorePendingTransfers, bool()); 27 MOCK_METHOD2( 28 CreatePixelTransferDelegateImpl, 29 AsyncPixelTransferDelegate*(gles2::TextureRef* ref, 30 const AsyncTexImage2DParams& define_params)); 31 32 private: 33 DISALLOW_COPY_AND_ASSIGN(MockAsyncPixelTransferManager); 34 }; 35 36 } // namespace gpu 37 38 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_TEST_H_ 39