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 1382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1393 cc::TextureMailbox texture_mailbox; | 1393 cc::TextureMailbox texture_mailbox; |
1394 scoped_ptr<cc::SingleReleaseCallback> release_callback; | 1394 scoped_ptr<cc::SingleReleaseCallback> release_callback; |
1395 result->TakeTexture(&texture_mailbox, &release_callback); | 1395 result->TakeTexture(&texture_mailbox, &release_callback); |
1396 DCHECK(texture_mailbox.IsTexture()); | 1396 DCHECK(texture_mailbox.IsTexture()); |
1397 if (!texture_mailbox.IsTexture()) | 1397 if (!texture_mailbox.IsTexture()) |
1398 return; | 1398 return; |
1399 | 1399 |
1400 ignore_result(scoped_callback_runner.Release()); | 1400 ignore_result(scoped_callback_runner.Release()); |
1401 | 1401 |
1402 gl_helper->CropScaleReadbackAndCleanMailbox( | 1402 gl_helper->CropScaleReadbackAndCleanMailbox( |
1403 texture_mailbox.name(), | 1403 texture_mailbox.mailbox(), |
1404 texture_mailbox.sync_point(), | 1404 texture_mailbox.sync_point(), |
1405 result->size(), | 1405 result->size(), |
1406 gfx::Rect(result->size()), | 1406 gfx::Rect(result->size()), |
1407 dst_size_in_pixel, | 1407 dst_size_in_pixel, |
1408 pixels, | 1408 pixels, |
1409 base::Bind(&CopyFromCompositingSurfaceFinished, | 1409 base::Bind(&CopyFromCompositingSurfaceFinished, |
1410 callback, | 1410 callback, |
1411 base::Passed(&release_callback), | 1411 base::Passed(&release_callback), |
1412 base::Passed(&bitmap), | 1412 base::Passed(&bitmap), |
1413 base::Passed(&bitmap_pixels_lock))); | 1413 base::Passed(&bitmap_pixels_lock))); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1456 // RenderWidgetHostView, public: | 1456 // RenderWidgetHostView, public: |
1457 | 1457 |
1458 // static | 1458 // static |
1459 RenderWidgetHostView* | 1459 RenderWidgetHostView* |
1460 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { | 1460 RenderWidgetHostView::CreateViewForWidget(RenderWidgetHost* widget) { |
1461 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); | 1461 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(widget); |
1462 return new RenderWidgetHostViewAndroid(rwhi, NULL); | 1462 return new RenderWidgetHostViewAndroid(rwhi, NULL); |
1463 } | 1463 } |
1464 | 1464 |
1465 } // namespace content | 1465 } // namespace content |
OLD | NEW |