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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 143683003: Support format using enum argument for Async readback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code changes as per review. 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
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_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 const gfx::Size& accelerated_dst_size, 718 const gfx::Size& accelerated_dst_size,
719 const base::Callback<void(bool, const SkBitmap&)>& callback) { 719 const base::Callback<void(bool, const SkBitmap&)>& callback) {
720 if (view_ && is_accelerated_compositing_active_) { 720 if (view_ && is_accelerated_compositing_active_) {
721 TRACE_EVENT0("browser", 721 TRACE_EVENT0("browser",
722 "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface"); 722 "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface");
723 gfx::Rect accelerated_copy_rect = src_subrect.IsEmpty() ? 723 gfx::Rect accelerated_copy_rect = src_subrect.IsEmpty() ?
724 gfx::Rect(view_->GetViewBounds().size()) : src_subrect; 724 gfx::Rect(view_->GetViewBounds().size()) : src_subrect;
725 view_->CopyFromCompositingSurface(accelerated_copy_rect, 725 view_->CopyFromCompositingSurface(accelerated_copy_rect,
726 accelerated_dst_size, 726 accelerated_dst_size,
727 callback, 727 callback,
728 false); 728 SkBitmap::kARGB_8888_Config);
729 return; 729 return;
730 } 730 }
731 731
732 BackingStore* backing_store = GetBackingStore(false); 732 BackingStore* backing_store = GetBackingStore(false);
733 if (!backing_store) { 733 if (!backing_store) {
734 callback.Run(false, SkBitmap()); 734 callback.Run(false, SkBitmap());
735 return; 735 return;
736 } 736 }
737 737
738 TRACE_EVENT0("browser", 738 TRACE_EVENT0("browser",
(...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after
2566 } 2566 }
2567 } 2567 }
2568 2568
2569 // Add newly generated components into the latency info 2569 // Add newly generated components into the latency info
2570 for (lc = new_components.begin(); lc != new_components.end(); ++lc) { 2570 for (lc = new_components.begin(); lc != new_components.end(); ++lc) {
2571 latency_info->latency_components[lc->first] = lc->second; 2571 latency_info->latency_components[lc->first] = lc->second;
2572 } 2572 }
2573 } 2573 }
2574 2574
2575 } // namespace content 2575 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698