OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 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 UI_GL_ASYNC_TASK_DELEGATE_STUB_H_ |
| 6 #define UI_GL_ASYNC_TASK_DELEGATE_STUB_H_ |
| 7 |
| 8 #include "ui/gl/async_pixel_transfer_delegate.h" |
| 9 |
| 10 namespace gfx { |
| 11 |
| 12 class AsyncTransferStateStub : public AsyncPixelTransferState { |
| 13 public: |
| 14 // implement AsyncPixelTransferState: |
| 15 virtual bool TransferIsInProgress() OVERRIDE; |
| 16 virtual void BindTransfer(AsyncTexImage2DParams* bound_params) OVERRIDE; |
| 17 |
| 18 private: |
| 19 friend class AsyncPixelTransferDelegateStub; |
| 20 bool needs_late_bind_; |
| 21 AsyncTexImage2DParams late_bind_define_params_ ; |
| 22 |
| 23 explicit AsyncTransferStateStub(GLuint texture_id); |
| 24 virtual ~AsyncTransferStateStub(); |
| 25 DISALLOW_COPY_AND_ASSIGN(AsyncTransferStateStub); |
| 26 }; |
| 27 |
| 28 // Class which handles async pixel transfers (as a fallback). |
| 29 // This class just does the uploads synchronously. |
| 30 class AsyncPixelTransferDelegateStub : public AsyncPixelTransferDelegate { |
| 31 public: |
| 32 static scoped_ptr<AsyncPixelTransferDelegate> |
| 33 Create(gfx::GLContext* context); |
| 34 |
| 35 AsyncPixelTransferDelegateStub(); |
| 36 virtual ~AsyncPixelTransferDelegateStub(); |
| 37 |
| 38 // implement AsyncPixelTransferDelegate: |
| 39 virtual void AsyncNotifyCompletion(const base::Closure& task) OVERRIDE; |
| 40 virtual void AsyncTexImage2D( |
| 41 AsyncPixelTransferState* transfer_state, |
| 42 const AsyncTexImage2DParams& tex_params, |
| 43 const AsyncMemoryParams& mem_params) OVERRIDE; |
| 44 virtual void AsyncTexSubImage2D( |
| 45 AsyncPixelTransferState* transfer_state, |
| 46 const AsyncTexSubImage2DParams& tex_params, |
| 47 const AsyncMemoryParams& mem_params) OVERRIDE; |
| 48 private: |
| 49 // implement AsyncPixelTransferDelegate: |
| 50 virtual AsyncPixelTransferState* |
| 51 CreateRawPixelTransferState(GLuint texture_id) OVERRIDE; |
| 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegateStub); |
| 54 }; |
| 55 |
| 56 } // namespace gfx |
| 57 |
| 58 #endif // UI_GL_ASYNC_TASK_DELEGATE_ANDROID_H_ |
| 59 |
OLD | NEW |