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

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

Issue 462173002: Fix set_area sizes for RequestCopyOfOutput, and related tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove 'middle 3 columns' exception, per sky@. Created 6 years, 4 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
« no previous file with comments | « no previous file | content/browser/media/capture/desktop_capture_device_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 176 }
177 177
178 scoped_ptr<cc::CopyOutputRequest> request = 178 scoped_ptr<cc::CopyOutputRequest> request =
179 cc::CopyOutputRequest::CreateRequest(base::Bind( 179 cc::CopyOutputRequest::CreateRequest(base::Bind(
180 &DelegatedFrameHost:: 180 &DelegatedFrameHost::
181 CopyFromCompositingSurfaceHasResultForVideo, 181 CopyFromCompositingSurfaceHasResultForVideo,
182 AsWeakPtr(), // For caching the ReadbackYUVInterface on this class. 182 AsWeakPtr(), // For caching the ReadbackYUVInterface on this class.
183 subscriber_texture, 183 subscriber_texture,
184 target, 184 target,
185 callback)); 185 callback));
186 gfx::Rect src_subrect_in_pixel = 186 request->set_area(src_subrect);
187 ConvertRectToPixel(client_->CurrentDeviceScaleFactor(), src_subrect);
188 request->set_area(src_subrect_in_pixel);
189 if (subscriber_texture.get()) { 187 if (subscriber_texture.get()) {
190 request->SetTextureMailbox( 188 request->SetTextureMailbox(
191 cc::TextureMailbox(subscriber_texture->mailbox(), 189 cc::TextureMailbox(subscriber_texture->mailbox(),
192 subscriber_texture->target(), 190 subscriber_texture->target(),
193 subscriber_texture->sync_point())); 191 subscriber_texture->sync_point()));
194 } 192 }
195 client_->RequestCopyOfOutput(request.Pass()); 193 client_->RequestCopyOfOutput(request.Pass());
196 } 194 }
197 195
198 bool DelegatedFrameHost::CanCopyToBitmap() const { 196 bool DelegatedFrameHost::CanCopyToBitmap() const {
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 if (frame_provider_.get()) { 916 if (frame_provider_.get()) {
919 new_layer->SetShowDelegatedContent(frame_provider_.get(), 917 new_layer->SetShowDelegatedContent(frame_provider_.get(),
920 current_frame_size_in_dip_); 918 current_frame_size_in_dip_);
921 } 919 }
922 if (!surface_id_.is_null()) { 920 if (!surface_id_.is_null()) {
923 new_layer->SetShowSurface(surface_id_, current_frame_size_in_dip_); 921 new_layer->SetShowSurface(surface_id_, current_frame_size_in_dip_);
924 } 922 }
925 } 923 }
926 924
927 } // namespace content 925 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/media/capture/desktop_capture_device_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698