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

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

Issue 374633002: SkBitmap::Config is deprecated, use SkColorType instead (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 is_loading_ = is_loading; 671 is_loading_ = is_loading;
672 if (!view_) 672 if (!view_)
673 return; 673 return;
674 view_->SetIsLoading(is_loading); 674 view_->SetIsLoading(is_loading);
675 } 675 }
676 676
677 void RenderWidgetHostImpl::CopyFromBackingStore( 677 void RenderWidgetHostImpl::CopyFromBackingStore(
678 const gfx::Rect& src_subrect, 678 const gfx::Rect& src_subrect,
679 const gfx::Size& accelerated_dst_size, 679 const gfx::Size& accelerated_dst_size,
680 const base::Callback<void(bool, const SkBitmap&)>& callback, 680 const base::Callback<void(bool, const SkBitmap&)>& callback,
681 const SkBitmap::Config& bitmap_config) { 681 const SkColorType color_type) {
682 if (view_) { 682 if (view_) {
683 TRACE_EVENT0("browser", 683 TRACE_EVENT0("browser",
684 "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface"); 684 "RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface");
685 gfx::Rect accelerated_copy_rect = src_subrect.IsEmpty() ? 685 gfx::Rect accelerated_copy_rect = src_subrect.IsEmpty() ?
686 gfx::Rect(view_->GetViewBounds().size()) : src_subrect; 686 gfx::Rect(view_->GetViewBounds().size()) : src_subrect;
687 view_->CopyFromCompositingSurface( 687 view_->CopyFromCompositingSurface(
688 accelerated_copy_rect, accelerated_dst_size, callback, bitmap_config); 688 accelerated_copy_rect, accelerated_dst_size, callback, color_type);
689 return; 689 return;
690 } 690 }
691 691
692 callback.Run(false, SkBitmap()); 692 callback.Run(false, SkBitmap());
693 } 693 }
694 694
695 bool RenderWidgetHostImpl::CanCopyFromBackingStore() { 695 bool RenderWidgetHostImpl::CanCopyFromBackingStore() {
696 if (view_) 696 if (view_)
697 return view_->IsSurfaceAvailableForCopy(); 697 return view_->IsSurfaceAvailableForCopy();
698 return false; 698 return false;
(...skipping 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after
2360 ++lc; 2360 ++lc;
2361 } 2361 }
2362 } 2362 }
2363 2363
2364 // Add newly generated components into the latency info 2364 // Add newly generated components into the latency info
2365 for (lc = new_components.begin(); lc != new_components.end(); ++lc) { 2365 for (lc = new_components.begin(); lc != new_components.end(); ++lc) {
2366 latency_info->latency_components[lc->first] = lc->second; 2366 latency_info->latency_components[lc->first] = lc->second;
2367 } 2367 }
2368 } 2368 }
2369 2369
2370 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { 2370 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() {
2371 if (view_) 2371 if (view_)
2372 return view_->PreferredReadbackFormat(); 2372 return view_->PreferredReadbackFormat();
2373 return SkBitmap::kARGB_8888_Config; 2373 return kN32_SkColorType;
2374 } 2374 }
2375 2375
2376 } // namespace content 2376 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698