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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.h

Issue 1737733002: [DevTools] Handle emulated device scale factor and original device scale factor properly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 5 #ifndef CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 6 #define CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // cc::RemoteProtoChannel implementation. 186 // cc::RemoteProtoChannel implementation.
187 void SetProtoReceiver(ProtoReceiver* receiver) override; 187 void SetProtoReceiver(ProtoReceiver* receiver) override;
188 void SendCompositorProto(const cc::proto::CompositorMessage& proto) override; 188 void SendCompositorProto(const cc::proto::CompositorMessage& proto) override;
189 189
190 enum { 190 enum {
191 OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK = 4, 191 OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK = 4,
192 MAX_OUTPUT_SURFACE_RETRIES = 5, 192 MAX_OUTPUT_SURFACE_RETRIES = 5,
193 }; 193 };
194 194
195 protected: 195 protected:
196 friend class RenderViewImplScaleFactorTest;
197
196 RenderWidgetCompositor(RenderWidgetCompositorDelegate* delegate, 198 RenderWidgetCompositor(RenderWidgetCompositorDelegate* delegate,
197 CompositorDependencies* compositor_deps); 199 CompositorDependencies* compositor_deps);
198 200
199 void Initialize(float device_scale_factor); 201 void Initialize(float device_scale_factor);
200 cc::LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); } 202 cc::LayerTreeHost* layer_tree_host() { return layer_tree_host_.get(); }
201 203
202 private: 204 private:
203 void LayoutAndUpdateLayers(); 205 void LayoutAndUpdateLayers();
204 void InvokeLayoutAndPaintCallback(); 206 void InvokeLayoutAndPaintCallback();
205 bool CompositeIsSynchronous() const; 207 bool CompositeIsSynchronous() const;
206 void SynchronouslyComposite(); 208 void SynchronouslyComposite();
207 209
208 int num_failed_recreate_attempts_; 210 int num_failed_recreate_attempts_;
209 RenderWidgetCompositorDelegate* const delegate_; 211 RenderWidgetCompositorDelegate* const delegate_;
210 CompositorDependencies* const compositor_deps_; 212 CompositorDependencies* const compositor_deps_;
211 scoped_ptr<cc::LayerTreeHost> layer_tree_host_; 213 scoped_ptr<cc::LayerTreeHost> layer_tree_host_;
212 bool never_visible_; 214 bool never_visible_;
213 215
214 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; 216 blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_;
215 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_; 217 scoped_ptr<cc::CopyOutputRequest> temporary_copy_output_request_;
216 218
217 cc::RemoteProtoChannel::ProtoReceiver* remote_proto_channel_receiver_; 219 cc::RemoteProtoChannel::ProtoReceiver* remote_proto_channel_receiver_;
218 220
219 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_; 221 base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_;
220 }; 222 };
221 223
222 } // namespace content 224 } // namespace content
223 225
224 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_ 226 #endif // CONTENT_RENDERER_GPU_RENDER_WIDGET_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698