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

Side by Side Diff: content/browser/compositor/delegated_frame_host.cc

Issue 571413002: Declare a new name for CompositingSurface completion callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed build issue. Created 6 years, 3 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 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 else 136 else
137 request->SendEmptyResult(); 137 request->SendEmptyResult();
138 } else { 138 } else {
139 client_->GetLayer()->RequestCopyOfOutput(request.Pass()); 139 client_->GetLayer()->RequestCopyOfOutput(request.Pass());
140 } 140 }
141 } 141 }
142 142
143 void DelegatedFrameHost::CopyFromCompositingSurface( 143 void DelegatedFrameHost::CopyFromCompositingSurface(
144 const gfx::Rect& src_subrect, 144 const gfx::Rect& src_subrect,
145 const gfx::Size& output_size, 145 const gfx::Size& output_size,
146 const base::Callback<void(bool, const SkBitmap&)>& callback, 146 CopyFromCompositingSurfaceCallback& callback,
147 const SkColorType color_type) { 147 const SkColorType color_type) {
148 // Only ARGB888 and RGB565 supported as of now. 148 // Only ARGB888 and RGB565 supported as of now.
149 bool format_support = ((color_type == kAlpha_8_SkColorType) || 149 bool format_support = ((color_type == kAlpha_8_SkColorType) ||
150 (color_type == kRGB_565_SkColorType) || 150 (color_type == kRGB_565_SkColorType) ||
151 (color_type == kN32_SkColorType)); 151 (color_type == kN32_SkColorType));
152 DCHECK(format_support); 152 DCHECK(format_support);
153 if (!CanCopyToBitmap()) { 153 if (!CanCopyToBitmap()) {
154 callback.Run(false, SkBitmap()); 154 callback.Run(false, SkBitmap());
155 return; 155 return;
156 } 156 }
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 if (frame_provider_.get()) { 976 if (frame_provider_.get()) {
977 new_layer->SetShowDelegatedContent(frame_provider_.get(), 977 new_layer->SetShowDelegatedContent(frame_provider_.get(),
978 current_frame_size_in_dip_); 978 current_frame_size_in_dip_);
979 } 979 }
980 if (!surface_id_.is_null()) { 980 if (!surface_id_.is_null()) {
981 new_layer->SetShowSurface(surface_id_, current_frame_size_in_dip_); 981 new_layer->SetShowSurface(surface_id_, current_frame_size_in_dip_);
982 } 982 }
983 } 983 }
984 984
985 } // namespace content 985 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/delegated_frame_host.h ('k') | content/browser/frame_host/render_widget_host_view_child_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698