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

Unified Diff: ui/gl/async_pixel_transfer_delegate_android.cc

Issue 12040049: gpu: Implement idle async pixel transfers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add DCHECKs to ensure idle async uploads are only used with GL_TEXTURE_2D target 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/async_pixel_transfer_delegate.h ('k') | ui/gl/async_pixel_transfer_delegate_idle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/async_pixel_transfer_delegate_android.cc
diff --git a/ui/gl/async_pixel_transfer_delegate_android.cc b/ui/gl/async_pixel_transfer_delegate_android.cc
index 6a3463950adc74b66cc79ff6769a273be22c48f8..31f90bc2aad24e32e9f27cb9b864123063bc3ca7 100644
--- a/ui/gl/async_pixel_transfer_delegate_android.cc
+++ b/ui/gl/async_pixel_transfer_delegate_android.cc
@@ -113,7 +113,7 @@ void DoFullTexSubImage2D(const AsyncTexImage2DParams& tex_params, void* data) {
// Gets the address of the data from shared memory.
void* GetAddress(SharedMemory* shared_memory, uint32 shm_data_offset) {
// Memory bounds have already been validated, so there
- // is just DCHECKS here.
+ // are just DCHECKS here.
CHECK(shared_memory);
CHECK(shared_memory->memory());
return static_cast<int8*>(shared_memory->memory()) + shm_data_offset;
@@ -212,7 +212,6 @@ class TransferStateInternal
// We can only change the active texture and unit 0,
// as that is all that will be restored.
- glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, texture_id_);
glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, egl_image_);
bind_callback_.Run();
@@ -384,6 +383,8 @@ class AsyncPixelTransferDelegateAndroid
AsyncPixelTransferState* state) OVERRIDE;
virtual uint32 GetTextureUploadCount() OVERRIDE;
virtual base::TimeDelta GetTotalTextureUploadTime() OVERRIDE;
+ virtual bool ProcessMorePendingTransfers() OVERRIDE;
+ virtual bool NeedsProcessMorePendingTransfers() OVERRIDE;
private:
// implement AsyncPixelTransferDelegate:
@@ -483,12 +484,11 @@ AsyncPixelTransferState*
// we just using image_preservedd=TRUE on Qualcomm as a work-around.
bool use_image_preserved = is_qualcomm_ || is_imagination_;
- return static_cast<AsyncPixelTransferState*>(
- new AsyncTransferStateAndroid(texture_id,
- define_params,
- wait_for_uploads,
- wait_for_creation,
- use_image_preserved));
+ return new AsyncTransferStateAndroid(texture_id,
+ define_params,
+ wait_for_uploads,
+ wait_for_creation,
+ use_image_preserved);
}
bool AsyncPixelTransferDelegateAndroid::BindCompletedAsyncTransfers() {
@@ -658,6 +658,15 @@ base::TimeDelta AsyncPixelTransferDelegateAndroid::GetTotalTextureUploadTime() {
return total_texture_upload_time;
}
+bool AsyncPixelTransferDelegateAndroid::ProcessMorePendingTransfers() {
+ return false;
+}
+
+bool AsyncPixelTransferDelegateAndroid::NeedsProcessMorePendingTransfers() {
+ return false;
+}
+
+
namespace {
void SetGlParametersForEglImageTexture() {
// These params are needed for EGLImage creation to succeed on several
« no previous file with comments | « ui/gl/async_pixel_transfer_delegate.h ('k') | ui/gl/async_pixel_transfer_delegate_idle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698