| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/compositor/delegated_frame_host.h" | 5 #include "content/browser/compositor/delegated_frame_host.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
| 10 #include "cc/output/compositor_frame_ack.h" | 10 #include "cc/output/compositor_frame_ack.h" |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 texture_mailbox.sync_point(), | 493 texture_mailbox.sync_point(), |
| 494 result->size(), | 494 result->size(), |
| 495 gfx::Rect(result->size()), | 495 gfx::Rect(result->size()), |
| 496 dst_size_in_pixel, | 496 dst_size_in_pixel, |
| 497 pixels, | 497 pixels, |
| 498 config, | 498 config, |
| 499 base::Bind(&CopyFromCompositingSurfaceFinished, | 499 base::Bind(&CopyFromCompositingSurfaceFinished, |
| 500 callback, | 500 callback, |
| 501 base::Passed(&release_callback), | 501 base::Passed(&release_callback), |
| 502 base::Passed(&bitmap), | 502 base::Passed(&bitmap), |
| 503 base::Passed(&bitmap_pixels_lock))); | 503 base::Passed(&bitmap_pixels_lock)), |
| 504 GLHelper::SCALER_QUALITY_FAST); |
| 504 } | 505 } |
| 505 | 506 |
| 506 // static | 507 // static |
| 507 void DelegatedFrameHost::PrepareBitmapCopyOutputResult( | 508 void DelegatedFrameHost::PrepareBitmapCopyOutputResult( |
| 508 const gfx::Size& dst_size_in_pixel, | 509 const gfx::Size& dst_size_in_pixel, |
| 509 const SkBitmap::Config config, | 510 const SkBitmap::Config config, |
| 510 const base::Callback<void(bool, const SkBitmap&)>& callback, | 511 const base::Callback<void(bool, const SkBitmap&)>& callback, |
| 511 scoped_ptr<cc::CopyOutputResult> result) { | 512 scoped_ptr<cc::CopyOutputResult> result) { |
| 512 if (config != SkBitmap::kARGB_8888_Config) { | 513 if (config != SkBitmap::kARGB_8888_Config) { |
| 513 NOTIMPLEMENTED(); | 514 NOTIMPLEMENTED(); |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 853 // that should keep our frame. old_layer will be returned to the | 854 // that should keep our frame. old_layer will be returned to the |
| 854 // RecreateLayer caller, and should have a copy. | 855 // RecreateLayer caller, and should have a copy. |
| 855 if (frame_provider_.get()) { | 856 if (frame_provider_.get()) { |
| 856 new_layer->SetShowDelegatedContent(frame_provider_.get(), | 857 new_layer->SetShowDelegatedContent(frame_provider_.get(), |
| 857 current_frame_size_in_dip_); | 858 current_frame_size_in_dip_); |
| 858 } | 859 } |
| 859 } | 860 } |
| 860 | 861 |
| 861 } // namespace content | 862 } // namespace content |
| 862 | 863 |
| OLD | NEW |