OLD | NEW |
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 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1355 cc::TextureMailbox texture_mailbox; | 1355 cc::TextureMailbox texture_mailbox; |
1356 scoped_ptr<cc::SingleReleaseCallback> release_callback; | 1356 scoped_ptr<cc::SingleReleaseCallback> release_callback; |
1357 result->TakeTexture(&texture_mailbox, &release_callback); | 1357 result->TakeTexture(&texture_mailbox, &release_callback); |
1358 DCHECK(texture_mailbox.IsTexture()); | 1358 DCHECK(texture_mailbox.IsTexture()); |
1359 if (!texture_mailbox.IsTexture()) | 1359 if (!texture_mailbox.IsTexture()) |
1360 return; | 1360 return; |
1361 | 1361 |
1362 ignore_result(scoped_callback_runner.Release()); | 1362 ignore_result(scoped_callback_runner.Release()); |
1363 | 1363 |
1364 gl_helper->CropScaleReadbackAndCleanMailbox( | 1364 gl_helper->CropScaleReadbackAndCleanMailbox( |
1365 texture_mailbox.name(), | 1365 texture_mailbox.mailbox(), |
1366 texture_mailbox.sync_point(), | 1366 texture_mailbox.sync_point(), |
1367 result->size(), | 1367 result->size(), |
1368 gfx::Rect(result->size()), | 1368 gfx::Rect(result->size()), |
1369 dst_size_in_pixel, | 1369 dst_size_in_pixel, |
1370 pixels, | 1370 pixels, |
1371 base::Bind(&CopyFromCompositingSurfaceFinished, | 1371 base::Bind(&CopyFromCompositingSurfaceFinished, |
1372 callback, | 1372 callback, |
1373 base::Passed(&release_callback), | 1373 base::Passed(&release_callback), |
1374 base::Passed(&bitmap), | 1374 base::Passed(&bitmap), |
1375 base::Passed(&bitmap_pixels_lock))); | 1375 base::Passed(&bitmap_pixels_lock))); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1418 // RenderWidgetHostView, public: | 1418 // RenderWidgetHostView, public: |
1419 | 1419 |
1420 // static | 1420 // static |
1421 RenderWidgetHostView* | 1421 RenderWidgetHostView* |
1422 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1422 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
1423 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1423 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
1424 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1424 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
1425 } | 1425 } |
1426 | 1426 |
1427 } // namespace content | 1427 } // namespace content |
OLD | NEW |