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

Side by Side Diff: ui/gl/async_pixel_transfer_delegate_stub.cc

Issue 12040049: gpu: Implement idle async pixel transfers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore use of kHandleMoreWorkPeriodBusyMs and address review feedback Created 7 years, 9 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) 2012 The Chromium Authors. All rights reserved. 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 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 "ui/gl/async_pixel_transfer_delegate_stub.h" 5 #include "ui/gl/async_pixel_transfer_delegate_stub.h"
6 6
7 #include "base/shared_memory.h" 7 #include "base/shared_memory.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "ui/gl/gl_bindings.h" 9 #include "ui/gl/gl_bindings.h"
10 10
(...skipping 10 matching lines...) Expand all
21 // is just DCHECKS here. 21 // is just DCHECKS here.
22 DCHECK(shared_memory); 22 DCHECK(shared_memory);
23 DCHECK(shared_memory->memory()); 23 DCHECK(shared_memory->memory());
24 DCHECK_LE(shm_data_offset + shm_data_size, shm_size); 24 DCHECK_LE(shm_data_offset + shm_data_size, shm_size);
25 return static_cast<int8*>(shared_memory->memory()) + shm_data_offset; 25 return static_cast<int8*>(shared_memory->memory()) + shm_data_offset;
26 } 26 }
27 } // namespace 27 } // namespace
28 28
29 namespace gfx { 29 namespace gfx {
30 30
31 #if !defined(OS_ANDROID)
32 scoped_ptr<AsyncPixelTransferDelegate>
33 AsyncPixelTransferDelegate::Create(gfx::GLContext* context) {
34 return AsyncPixelTransferDelegateStub::Create(context);
35 }
36 #endif
37
38 scoped_ptr<AsyncPixelTransferDelegate> 31 scoped_ptr<AsyncPixelTransferDelegate>
39 AsyncPixelTransferDelegateStub::Create(gfx::GLContext* context) { 32 AsyncPixelTransferDelegateStub::Create(gfx::GLContext* context) {
40 return make_scoped_ptr( 33 return make_scoped_ptr(
41 static_cast<AsyncPixelTransferDelegate*>( 34 static_cast<AsyncPixelTransferDelegate*>(
42 new AsyncPixelTransferDelegateStub())); 35 new AsyncPixelTransferDelegateStub()));
43 } 36 }
44 37
45 AsyncTransferStateStub::AsyncTransferStateStub(GLuint texture_id) { 38 AsyncTransferStateStub::AsyncTransferStateStub(GLuint texture_id) {
46 } 39 }
47 40
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 127 }
135 128
136 uint32 AsyncPixelTransferDelegateStub::GetTextureUploadCount() { 129 uint32 AsyncPixelTransferDelegateStub::GetTextureUploadCount() {
137 return texture_upload_count_; 130 return texture_upload_count_;
138 } 131 }
139 132
140 base::TimeDelta AsyncPixelTransferDelegateStub::GetTotalTextureUploadTime() { 133 base::TimeDelta AsyncPixelTransferDelegateStub::GetTotalTextureUploadTime() {
141 return total_texture_upload_time_; 134 return total_texture_upload_time_;
142 } 135 }
143 136
137 bool AsyncPixelTransferDelegateStub::ProcessMorePendingTransfers() {
138 return false;
139 }
140
141 bool AsyncPixelTransferDelegateStub::NeedsProcessMorePendingTransfers() {
142 return false;
143 }
144
144 } // namespace gfx 145 } // namespace gfx
145 146
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698