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

Unified Diff: content/browser/renderer_host/render_widget_host_view_android.cc

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 years, 1 month 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
Index: content/browser/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 9b5eb52f0d3f191a574ee5d9b826bd0c1facae2f..968c1bd20de4daf566061869e7aa5b584d9f773c 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -243,14 +243,14 @@ void CopyFromCompositingSurfaceFinished(
TRACE_EVENT0(
"cc", "RenderWidgetHostViewAndroid::CopyFromCompositingSurfaceFinished");
bitmap_pixels_lock.reset();
- uint32 sync_point = 0;
+ gpu::SyncToken sync_token;
if (result) {
GLHelper* gl_helper = GetPostReadbackGLHelper();
if (gl_helper)
- sync_point = gl_helper->InsertSyncPoint();
+ sync_token = gpu::SyncToken(gl_helper->InsertSyncPoint());
}
- bool lost_resource = sync_point == 0;
- release_callback->Run(sync_point, lost_resource);
+ const bool lost_resource = !sync_token.HasData();
+ release_callback->Run(sync_token, lost_resource);
UMA_HISTOGRAM_TIMES(kAsyncReadBackString,
base::TimeTicks::Now() - start_time);
ReadbackResponse response = result ? READBACK_SUCCESS : READBACK_FAILED;
@@ -1988,19 +1988,11 @@ void RenderWidgetHostViewAndroid::PrepareTextureCopyOutputResult(
ignore_result(scoped_callback_runner.Release());
gl_helper->CropScaleReadbackAndCleanMailbox(
- texture_mailbox.mailbox(),
- texture_mailbox.sync_point(),
- result->size(),
- gfx::Rect(result->size()),
- output_size_in_pixel,
- pixels,
- color_type,
- base::Bind(&CopyFromCompositingSurfaceFinished,
- callback,
- base::Passed(&release_callback),
- base::Passed(&bitmap),
- start_time,
- base::Passed(&bitmap_pixels_lock)),
+ texture_mailbox.mailbox(), texture_mailbox.sync_token(), result->size(),
+ gfx::Rect(result->size()), output_size_in_pixel, pixels, color_type,
+ base::Bind(&CopyFromCompositingSurfaceFinished, callback,
+ base::Passed(&release_callback), base::Passed(&bitmap),
+ start_time, base::Passed(&bitmap_pixels_lock)),
GLHelper::SCALER_QUALITY_GOOD);
}

Powered by Google App Engine
This is Rietveld 408576698