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

Side by Side Diff: content/renderer/android/synchronous_compositor_frame_sink.cc

Issue 2669183002: Seems incorrect to se device_scale_factor in SetLocalSurfaceId.
Patch Set: Seems incorrect to set device_scale_factor in SetLocalSurfaceId. Added new function SetDeviceScaleF… Created 3 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/android/synchronous_compositor_frame_sink.h" 5 #include "content/renderer/android/synchronous_compositor_frame_sink.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 if (in_software_draw_) { 239 if (in_software_draw_) {
240 // The frame we send to the client is actually just the metadata. Preserve 240 // The frame we send to the client is actually just the metadata. Preserve
241 // the |frame| for the software path below. 241 // the |frame| for the software path below.
242 submit_frame.metadata = frame.metadata.Clone(); 242 submit_frame.metadata = frame.metadata.Clone();
243 243
244 if (!root_local_surface_id_.is_valid()) { 244 if (!root_local_surface_id_.is_valid()) {
245 root_local_surface_id_ = local_surface_id_allocator_->GenerateId(); 245 root_local_surface_id_ = local_surface_id_allocator_->GenerateId();
246 child_local_surface_id_ = local_surface_id_allocator_->GenerateId(); 246 child_local_surface_id_ = local_surface_id_allocator_->GenerateId();
247 } 247 }
248 248
249 display_->SetLocalSurfaceId(root_local_surface_id_, 249 display_->SetLocalSurfaceId(root_local_surface_id_);
250 frame.metadata.device_scale_factor); 250 display_->SetDeviceScaleFactor(frame.metadata.device_scale_factor);
251 251
252 // The layer compositor should be giving a frame that covers the 252 // The layer compositor should be giving a frame that covers the
253 // |sw_viewport_for_current_draw_| but at 0,0. 253 // |sw_viewport_for_current_draw_| but at 0,0.
254 gfx::Size child_size = sw_viewport_for_current_draw_.size(); 254 gfx::Size child_size = sw_viewport_for_current_draw_.size();
255 DCHECK(gfx::Rect(child_size) == frame.render_pass_list.back()->output_rect); 255 DCHECK(gfx::Rect(child_size) == frame.render_pass_list.back()->output_rect);
256 256
257 // Make a size that covers from 0,0 and includes the area coming from the 257 // Make a size that covers from 0,0 and includes the area coming from the
258 // layer compositor. 258 // layer compositor.
259 gfx::Size display_size(sw_viewport_for_current_draw_.right(), 259 gfx::Size display_size(sw_viewport_for_current_draw_.right(),
260 sw_viewport_for_current_draw_.bottom()); 260 sw_viewport_for_current_draw_.bottom());
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 const cc::ReturnedResourceArray& resources) { 469 const cc::ReturnedResourceArray& resources) {
470 DCHECK(resources.empty()); 470 DCHECK(resources.empty());
471 client_->ReclaimResources(resources); 471 client_->ReclaimResources(resources);
472 } 472 }
473 473
474 void SynchronousCompositorFrameSink::WillDrawSurface( 474 void SynchronousCompositorFrameSink::WillDrawSurface(
475 const cc::LocalSurfaceId& local_surface_id, 475 const cc::LocalSurfaceId& local_surface_id,
476 const gfx::Rect& damage_rect) {} 476 const gfx::Rect& damage_rect) {}
477 477
478 } // namespace content 478 } // namespace content
OLDNEW
« no previous file with comments | « components/display_compositor/gpu_root_compositor_frame_sink.cc ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698