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

Side by Side Diff: gpu/command_buffer/service/async_pixel_transfer_manager_stub.cc

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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 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 #include "gpu/command_buffer/service/async_pixel_transfer_delegate_stub.h" 5 #include "gpu/command_buffer/service/async_pixel_transfer_manager_stub.h"
6
7 #include "gpu/command_buffer/service/async_pixel_transfer_delegate.h"
6 8
7 namespace gpu { 9 namespace gpu {
8 10
9 namespace { 11 namespace {
10 12
11 class AsyncPixelTransferStateImpl : public AsyncPixelTransferState { 13 class AsyncPixelTransferStateImpl : public AsyncPixelTransferState {
12 public: 14 public:
13 AsyncPixelTransferStateImpl() {} 15 AsyncPixelTransferStateImpl() {}
14 16
15 // Implement AsyncPixelTransferState: 17 // Implement AsyncPixelTransferState:
16 virtual bool TransferIsInProgress() OVERRIDE { 18 virtual bool TransferIsInProgress() OVERRIDE {
17 return false; 19 return false;
18 } 20 }
19 21
20 private: 22 private:
21 virtual ~AsyncPixelTransferStateImpl() {} 23 virtual ~AsyncPixelTransferStateImpl() {}
22 }; 24 };
23 25
24 } // namespace 26 } // namespace
25 27
28 class AsyncPixelTransferDelegateStub : public AsyncPixelTransferDelegate {
29 public:
30 AsyncPixelTransferDelegateStub();
31 virtual ~AsyncPixelTransferDelegateStub();
32
33 // Implement AsyncPixelTransferDelegate:
34 virtual AsyncPixelTransferState* CreatePixelTransferState(
35 GLuint texture_id,
36 const AsyncTexImage2DParams& define_params) OVERRIDE;
37 virtual void BindCompletedAsyncTransfers() OVERRIDE;
38 virtual void AsyncNotifyCompletion(
39 const AsyncMemoryParams& mem_params,
40 const CompletionCallback& callback) OVERRIDE;
41 virtual void AsyncTexImage2D(
42 AsyncPixelTransferState* state,
43 const AsyncTexImage2DParams& tex_params,
44 const AsyncMemoryParams& mem_params,
45 const base::Closure& bind_callback) OVERRIDE;
46 virtual void AsyncTexSubImage2D(
47 AsyncPixelTransferState* transfer_state,
48 const AsyncTexSubImage2DParams& tex_params,
49 const AsyncMemoryParams& mem_params) OVERRIDE;
50 virtual void WaitForTransferCompletion(
51 AsyncPixelTransferState* state) OVERRIDE;
52 virtual uint32 GetTextureUploadCount() OVERRIDE;
53 virtual base::TimeDelta GetTotalTextureUploadTime() OVERRIDE;
54 virtual void ProcessMorePendingTransfers() OVERRIDE;
55 virtual bool NeedsProcessMorePendingTransfers() OVERRIDE;
56
57 private:
58 DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegateStub);
59 };
60
26 AsyncPixelTransferDelegateStub::AsyncPixelTransferDelegateStub() {} 61 AsyncPixelTransferDelegateStub::AsyncPixelTransferDelegateStub() {}
27 62
28 AsyncPixelTransferDelegateStub::~AsyncPixelTransferDelegateStub() {} 63 AsyncPixelTransferDelegateStub::~AsyncPixelTransferDelegateStub() {}
29 64
30 AsyncPixelTransferState* AsyncPixelTransferDelegateStub:: 65 AsyncPixelTransferState* AsyncPixelTransferDelegateStub::
31 CreatePixelTransferState(GLuint texture_id, 66 CreatePixelTransferState(GLuint texture_id,
32 const AsyncTexImage2DParams& define_params) { 67 const AsyncTexImage2DParams& define_params) {
33 return new AsyncPixelTransferStateImpl; 68 return new AsyncPixelTransferStateImpl;
34 } 69 }
35 70
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return base::TimeDelta(); 103 return base::TimeDelta();
69 } 104 }
70 105
71 void AsyncPixelTransferDelegateStub::ProcessMorePendingTransfers() { 106 void AsyncPixelTransferDelegateStub::ProcessMorePendingTransfers() {
72 } 107 }
73 108
74 bool AsyncPixelTransferDelegateStub::NeedsProcessMorePendingTransfers() { 109 bool AsyncPixelTransferDelegateStub::NeedsProcessMorePendingTransfers() {
75 return false; 110 return false;
76 } 111 }
77 112
113 AsyncPixelTransferManagerStub::AsyncPixelTransferManagerStub()
114 : delegate_(new AsyncPixelTransferDelegateStub()) {}
115
116 AsyncPixelTransferManagerStub::~AsyncPixelTransferManagerStub() {}
117
118 AsyncPixelTransferDelegate*
119 AsyncPixelTransferManagerStub::GetAsyncPixelTransferDelegate() {
120 return delegate_.get();
121 }
122
78 } // namespace gpu 123 } // namespace gpu
79
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698