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

Unified Diff: content/renderer/child_frame_compositing_helper.cc

Issue 1586923002: [UseZoomForDSF] Guest view support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/child_frame_compositing_helper.cc
diff --git a/content/renderer/child_frame_compositing_helper.cc b/content/renderer/child_frame_compositing_helper.cc
index 408fc0817b9fc0d86e739dd89fab2cdf9eafa872..3957cefe3b655f26fa17e8486101a15a3537758b 100644
--- a/content/renderer/child_frame_compositing_helper.cc
+++ b/content/renderer/child_frame_compositing_helper.cc
@@ -18,6 +18,7 @@
#include "cc/resources/single_release_callback.h"
#include "content/child/thread_safe_sender.h"
#include "content/common/browser_plugin/browser_plugin_messages.h"
+#include "content/common/content_switches_internal.h"
#include "content/common/frame_messages.h"
#include "content/common/gpu/client/context_provider_command_buffer.h"
#include "content/renderer/browser_plugin/browser_plugin.h"
@@ -314,6 +315,12 @@ void ChildFrameCompositingHelper::OnSetSurface(
scoped_refptr<cc::SurfaceLayer> surface_layer =
cc::SurfaceLayer::Create(cc_blink::WebLayerImpl::LayerSettings(),
satisfy_callback, require_callback);
+ // TODO(oshima): This is a stopgap fix so that the compositor does not
+ // scaledown the content when 2x frame data is added to 1x parent frame data.
+ // Fix this in cc/.
+ if (IsUseZoomForDSFEnabled())
+ scale_factor = 1.0f;
+
surface_layer->SetSurfaceId(surface_id, scale_factor, frame_size);
blink::WebLayer* layer = new cc_blink::WebLayerImpl(surface_layer);
UpdateWebLayer(layer);

Powered by Google App Engine
This is Rietveld 408576698