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

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

Issue 105743004: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: c301e01d Rebase. Created 6 years, 12 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
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index e3651c6a48102d0f8346f7eb6df978328dd7b419..4b26ccf7a6babf458b244d4c69fe7d070a1824bc 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -98,7 +98,8 @@ namespace content {
namespace {
void MailboxReleaseCallback(scoped_ptr<base::SharedMemory> shared_memory,
- unsigned sync_point, bool lost_resource) {
+ uint32 sync_point,
+ bool lost_resource) {
// NOTE: shared_memory will get released when we go out of scope.
}
@@ -1089,8 +1090,10 @@ void RenderWidgetHostViewAura::CopyFromCompositingSurfaceToVideoFrame(
ConvertRectToPixel(current_device_scale_factor_, src_subrect);
request->set_area(src_subrect_in_pixel);
if (subscriber_texture) {
- request->SetTextureMailbox(cc::TextureMailbox(
- subscriber_texture->mailbox(), subscriber_texture->sync_point()));
+ request->SetTextureMailbox(
+ cc::TextureMailbox(subscriber_texture->mailbox(),
+ subscriber_texture->target(),
+ subscriber_texture->sync_point()));
}
window_->layer()->RequestCopyOfOutput(request.Pass());
}
@@ -1841,7 +1844,7 @@ void RenderWidgetHostViewAura::PrepareTextureCopyOutputResult(
ignore_result(scoped_callback_runner.Release());
gl_helper->CropScaleReadbackAndCleanMailbox(
- texture_mailbox.name(),
+ texture_mailbox.mailbox(),
texture_mailbox.sync_point(),
result->size(),
gfx::Rect(result->size()),
@@ -1898,7 +1901,7 @@ void RenderWidgetHostViewAura::CopyFromCompositingSurfaceFinishedForVideo(
// If there's no release callback, then the texture is from
// idle_frame_subscriber_textures_ and we can put it back there.
DCHECK(subscriber_texture);
- subscriber_texture->UpdateSyncPoint(sync_point);
+ subscriber_texture->set_sync_point(sync_point);
if (rwhva && rwhva->frame_subscriber_ && subscriber_texture->texture_id())
rwhva->idle_frame_subscriber_textures_.push_back(subscriber_texture);
subscriber_texture = NULL;
@@ -2023,11 +2026,10 @@ void RenderWidgetHostViewAura::CopyFromCompositingSurfaceHasResultForVideo(
callback,
subscriber_texture,
base::Passed(&release_callback));
- yuv_readback_pipeline->ReadbackYUV(
- texture_mailbox.name(),
- texture_mailbox.sync_point(),
- video_frame.get(),
- finished_callback);
+ yuv_readback_pipeline->ReadbackYUV(texture_mailbox.mailbox(),
+ texture_mailbox.sync_point(),
+ video_frame.get(),
+ finished_callback);
}
void RenderWidgetHostViewAura::GetScreenInfo(WebScreenInfo* results) {

Powered by Google App Engine
This is Rietveld 408576698