Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: gpu/command_buffer/service/async_pixel_transfer_manager_egl.h

Issue 16175005: GPU: Replace AsyncPixelTransferState with AsyncPixelTransferDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_ 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_ 6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_
7 7
8 #include "gpu/command_buffer/service/async_pixel_transfer_manager.h" 8 #include "gpu/command_buffer/service/async_pixel_transfer_manager.h"
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 11
13 namespace gpu { 12 namespace gpu {
14 class AsyncPixelTransferDelegateEGL; 13 class AsyncPixelTransferDelegateEGL;
15 class AsyncPixelTransferUploadStats; 14 class AsyncPixelTransferUploadStats;
16 15
17 class AsyncPixelTransferManagerEGL : public AsyncPixelTransferManager { 16 class AsyncPixelTransferManagerEGL : public AsyncPixelTransferManager {
18 public: 17 public:
19 AsyncPixelTransferManagerEGL(); 18 AsyncPixelTransferManagerEGL();
20 virtual ~AsyncPixelTransferManagerEGL(); 19 virtual ~AsyncPixelTransferManagerEGL();
21 20
22 // AsyncPixelTransferManager implementation: 21 // AsyncPixelTransferManager implementation:
23 virtual void BindCompletedAsyncTransfers() OVERRIDE; 22 virtual void BindCompletedAsyncTransfers() OVERRIDE;
24 virtual void AsyncNotifyCompletion( 23 virtual void AsyncNotifyCompletion(
25 const AsyncMemoryParams& mem_params, 24 const AsyncMemoryParams& mem_params,
26 const CompletionCallback& callback) OVERRIDE; 25 const CompletionCallback& callback) OVERRIDE;
27 virtual uint32 GetTextureUploadCount() OVERRIDE; 26 virtual uint32 GetTextureUploadCount() OVERRIDE;
28 virtual base::TimeDelta GetTotalTextureUploadTime() OVERRIDE; 27 virtual base::TimeDelta GetTotalTextureUploadTime() OVERRIDE;
29 virtual void ProcessMorePendingTransfers() OVERRIDE; 28 virtual void ProcessMorePendingTransfers() OVERRIDE;
30 virtual bool NeedsProcessMorePendingTransfers() OVERRIDE; 29 virtual bool NeedsProcessMorePendingTransfers() OVERRIDE;
31 virtual AsyncPixelTransferDelegate* GetAsyncPixelTransferDelegate() OVERRIDE;
32 30
33 // State shared between Managers and Delegates. 31 // State shared between Managers and Delegates.
34 struct SharedState { 32 struct SharedState {
35 SharedState(); 33 SharedState();
36 ~SharedState(); 34 ~SharedState();
37 35
38 scoped_refptr<AsyncPixelTransferUploadStats> texture_upload_stats; 36 scoped_refptr<AsyncPixelTransferUploadStats> texture_upload_stats;
39 bool is_imagination; 37 bool is_imagination;
40 bool is_qualcomm; 38 bool is_qualcomm;
41 typedef std::list<base::WeakPtr<AsyncPixelTransferState> > TransferQueue; 39 typedef std::list<base::WeakPtr<AsyncPixelTransferDelegateEGL> >
40 TransferQueue;
42 TransferQueue pending_allocations; 41 TransferQueue pending_allocations;
43 }; 42 };
44 43
45 private: 44 private:
45 // AsyncPixelTransferManager implementation:
46 virtual AsyncPixelTransferDelegate* CreatePixelTransferDelegateImpl(
47 gles2::TextureRef* ref,
48 const AsyncTexImage2DParams& define_params) OVERRIDE;
49
46 SharedState shared_state_; 50 SharedState shared_state_;
47 scoped_ptr<AsyncPixelTransferDelegateEGL> delegate_;
48 51
49 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManagerEGL); 52 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferManagerEGL);
50 }; 53 };
51 54
52 } // namespace gpu 55 } // namespace gpu
53 56
54 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_ 57 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_MANAGER_EGL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698