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

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

Issue 2418173002: Fix HTML5 video blurry (Closed)
Patch Set: add dcheck Created 4 years, 2 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/renderer_host/delegated_frame_host.h" 5 #include "content/browser/renderer_host/delegated_frame_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 // Setting the source in this copy request asks that the layer abort any prior 377 // Setting the source in this copy request asks that the layer abort any prior
378 // uncommitted copy requests made on behalf of the same frame subscriber. 378 // uncommitted copy requests made on behalf of the same frame subscriber.
379 // This will not affect any of the copy requests spawned elsewhere from 379 // This will not affect any of the copy requests spawned elsewhere from
380 // DelegatedFrameHost (e.g., a call to CopyFromCompositingSurface() for 380 // DelegatedFrameHost (e.g., a call to CopyFromCompositingSurface() for
381 // screenshots) since those copy requests do not specify |frame_subscriber()| 381 // screenshots) since those copy requests do not specify |frame_subscriber()|
382 // as a source. 382 // as a source.
383 request->set_source(frame_subscriber()); 383 request->set_source(frame_subscriber());
384 if (subscriber_texture.get()) { 384 if (subscriber_texture.get()) {
385 request->SetTextureMailbox(cc::TextureMailbox( 385 request->SetTextureMailbox(cc::TextureMailbox(
386 subscriber_texture->mailbox(), subscriber_texture->sync_token(), 386 subscriber_texture->mailbox(), subscriber_texture->sync_token(),
387 subscriber_texture->target())); 387 subscriber_texture->target(), current_frame_size_in_dip_, false,
388 false));
388 } 389 }
389 390
390 if (surface_factory_.get()) { 391 if (surface_factory_.get()) {
391 // To avoid unnecessary composites, go directly to the Surface rather than 392 // To avoid unnecessary composites, go directly to the Surface rather than
392 // through RequestCopyOfOutput (which goes through the browser 393 // through RequestCopyOfOutput (which goes through the browser
393 // compositor). 394 // compositor).
394 if (!request_copy_of_output_callback_for_testing_.is_null()) 395 if (!request_copy_of_output_callback_for_testing_.is_null())
395 request_copy_of_output_callback_for_testing_.Run(std::move(request)); 396 request_copy_of_output_callback_for_testing_.Run(std::move(request));
396 else 397 else
397 surface_factory_->RequestCopyOfSurface(local_frame_id_, 398 surface_factory_->RequestCopyOfSurface(local_frame_id_,
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 new_layer->SetShowSurface( 909 new_layer->SetShowSurface(
909 cc::SurfaceId(frame_sink_id_, local_frame_id_), 910 cc::SurfaceId(frame_sink_id_, local_frame_id_),
910 base::Bind(&SatisfyCallback, base::Unretained(manager)), 911 base::Bind(&SatisfyCallback, base::Unretained(manager)),
911 base::Bind(&RequireCallback, base::Unretained(manager)), 912 base::Bind(&RequireCallback, base::Unretained(manager)),
912 current_surface_size_, current_scale_factor_, 913 current_surface_size_, current_scale_factor_,
913 current_frame_size_in_dip_); 914 current_frame_size_in_dip_);
914 } 915 }
915 } 916 }
916 917
917 } // namespace content 918 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698