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

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

Issue 16325018: GPU: Factory produces APTManagers instead of APTDelegates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
(Empty)
1 // Copyright (c) 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_DELEGATE_SHARE_GROUP_H_
6 #define GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_SHARE_GROUP_H_
7
8 #include "gpu/command_buffer/service/async_pixel_transfer_delegate.h"
9
10 #include <list>
11
12 #include "base/basictypes.h"
13 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h"
15
16 namespace gpu {
17
18 class AsyncPixelTransferDelegateShareGroup : public AsyncPixelTransferDelegate {
19 public:
20 explicit AsyncPixelTransferDelegateShareGroup(gfx::GLContext* context);
21 virtual ~AsyncPixelTransferDelegateShareGroup();
22
23 // Implement AsyncPixelTransferDelegate:
24 virtual AsyncPixelTransferState* CreatePixelTransferState(
25 GLuint texture_id,
26 const AsyncTexImage2DParams& define_params) OVERRIDE;
27 virtual void BindCompletedAsyncTransfers() OVERRIDE;
28 virtual void AsyncNotifyCompletion(
29 const AsyncMemoryParams& mem_params,
30 const CompletionCallback& callback) OVERRIDE;
31 virtual void AsyncTexImage2D(
32 AsyncPixelTransferState* state,
33 const AsyncTexImage2DParams& tex_params,
34 const AsyncMemoryParams& mem_params,
35 const base::Closure& bind_callback) OVERRIDE;
36 virtual void AsyncTexSubImage2D(
37 AsyncPixelTransferState* state,
38 const AsyncTexSubImage2DParams& tex_params,
39 const AsyncMemoryParams& mem_params) OVERRIDE;
40 virtual void WaitForTransferCompletion(
41 AsyncPixelTransferState* state) OVERRIDE;
42 virtual uint32 GetTextureUploadCount() OVERRIDE;
43 virtual base::TimeDelta GetTotalTextureUploadTime() OVERRIDE;
44 virtual void ProcessMorePendingTransfers() OVERRIDE;
45 virtual bool NeedsProcessMorePendingTransfers() OVERRIDE;
46
47 private:
48 typedef std::list<base::WeakPtr<AsyncPixelTransferState> > TransferQueue;
49 TransferQueue pending_allocations_;
50
51 scoped_refptr<AsyncPixelTransferUploadStats> texture_upload_stats_;
52
53 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegateShareGroup);
54 };
55
56 } // namespace gpu
57
58 #endif // GPU_COMMAND_BUFFER_SERVICE_ASYNC_PIXEL_TRANSFER_DELEGATE_SHARE_GROUP_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698