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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.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: 7694f236 const-ify ReleaseMailboxCB Created 6 years, 11 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 "content/browser/renderer_host/render_widget_host_view_android.h" 5 #include "content/browser/renderer_host/render_widget_host_view_android.h"
6 6
7 #include <android/bitmap.h> 7 #include <android/bitmap.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 cc::TextureMailbox texture_mailbox; 1357 cc::TextureMailbox texture_mailbox;
1358 scoped_ptr<cc::SingleReleaseCallback> release_callback; 1358 scoped_ptr<cc::SingleReleaseCallback> release_callback;
1359 result->TakeTexture(&texture_mailbox, &release_callback); 1359 result->TakeTexture(&texture_mailbox, &release_callback);
1360 DCHECK(texture_mailbox.IsTexture()); 1360 DCHECK(texture_mailbox.IsTexture());
1361 if (!texture_mailbox.IsTexture()) 1361 if (!texture_mailbox.IsTexture())
1362 return; 1362 return;
1363 1363
1364 ignore_result(scoped_callback_runner.Release()); 1364 ignore_result(scoped_callback_runner.Release());
1365 1365
1366 gl_helper->CropScaleReadbackAndCleanMailbox( 1366 gl_helper->CropScaleReadbackAndCleanMailbox(
1367 texture_mailbox.name(), 1367 texture_mailbox.mailbox(),
1368 texture_mailbox.sync_point(), 1368 texture_mailbox.sync_point(),
1369 result->size(), 1369 result->size(),
1370 gfx::Rect(result->size()), 1370 gfx::Rect(result->size()),
1371 dst_size_in_pixel, 1371 dst_size_in_pixel,
1372 pixels, 1372 pixels,
1373 base::Bind(&CopyFromCompositingSurfaceFinished, 1373 base::Bind(&CopyFromCompositingSurfaceFinished,
1374 callback, 1374 callback,
1375 base::Passed(&release_callback), 1375 base::Passed(&release_callback),
1376 base::Passed(&bitmap), 1376 base::Passed(&bitmap),
1377 base::Passed(&bitmap_pixels_lock))); 1377 base::Passed(&bitmap_pixels_lock)));
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 // RenderWidgetHostView, public: 1420 // RenderWidgetHostView, public:
1421 1421
1422 // static 1422 // static
1423 RenderWidgetHostView* 1423 RenderWidgetHostView*
1424 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { 1424 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) {
1425 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); 1425 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget);
1426 return new RenderWidgetHostViewAndroid(rwhi, NULL); 1426 return new RenderWidgetHostViewAndroid(rwhi, NULL);
1427 } 1427 }
1428 1428
1429 } // namespace content 1429 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698