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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 result->size(), | 614 result->size(), |
615 gfx::Rect(result->size()), | 615 gfx::Rect(result->size()), |
616 dst_size_in_pixel, | 616 dst_size_in_pixel, |
617 pixels, | 617 pixels, |
618 color_type, | 618 color_type, |
619 base::Bind(&CopyFromCompositingSurfaceFinished, | 619 base::Bind(&CopyFromCompositingSurfaceFinished, |
620 callback, | 620 callback, |
621 base::Passed(&release_callback), | 621 base::Passed(&release_callback), |
622 base::Passed(&bitmap), | 622 base::Passed(&bitmap), |
623 base::Passed(&bitmap_pixels_lock)), | 623 base::Passed(&bitmap_pixels_lock)), |
624 GLHelper::SCALER_QUALITY_FAST); | 624 GLHelper::SCALER_QUALITY_GOOD); |
625 } | 625 } |
626 | 626 |
627 // static | 627 // static |
628 void DelegatedFrameHost::PrepareBitmapCopyOutputResult( | 628 void DelegatedFrameHost::PrepareBitmapCopyOutputResult( |
629 const gfx::Size& dst_size_in_pixel, | 629 const gfx::Size& dst_size_in_pixel, |
630 const SkColorType color_type, | 630 const SkColorType color_type, |
631 ReadbackRequestCallback& callback, | 631 ReadbackRequestCallback& callback, |
632 scoped_ptr<cc::CopyOutputResult> result) { | 632 scoped_ptr<cc::CopyOutputResult> result) { |
633 if (color_type != kN32_SkColorType && color_type != kAlpha_8_SkColorType) { | 633 if (color_type != kN32_SkColorType && color_type != kAlpha_8_SkColorType) { |
634 NOTIMPLEMENTED(); | 634 NOTIMPLEMENTED(); |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 cc::SurfaceManager* manager = factory->GetSurfaceManager(); | 1005 cc::SurfaceManager* manager = factory->GetSurfaceManager(); |
1006 new_layer->SetShowSurface( | 1006 new_layer->SetShowSurface( |
1007 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), | 1007 surface_id_, base::Bind(&SatisfyCallback, base::Unretained(manager)), |
1008 base::Bind(&RequireCallback, base::Unretained(manager)), | 1008 base::Bind(&RequireCallback, base::Unretained(manager)), |
1009 current_surface_size_, current_scale_factor_, | 1009 current_surface_size_, current_scale_factor_, |
1010 current_frame_size_in_dip_); | 1010 current_frame_size_in_dip_); |
1011 } | 1011 } |
1012 } | 1012 } |
1013 | 1013 |
1014 } // namespace content | 1014 } // namespace content |
OLD | NEW |