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

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 15579002: Implement transform/clip support for Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address joth's code review Created 7 years, 7 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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 CC_TREES_LAYER_TREE_HOST_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 virtual void OnSwapBuffersComplete() OVERRIDE; 188 virtual void OnSwapBuffersComplete() OVERRIDE;
189 virtual void SetFullRootLayerDamage() OVERRIDE; 189 virtual void SetFullRootLayerDamage() OVERRIDE;
190 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy) 190 virtual void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
191 OVERRIDE; 191 OVERRIDE;
192 virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy) 192 virtual void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy)
193 OVERRIDE; 193 OVERRIDE;
194 virtual bool HasImplThread() const OVERRIDE; 194 virtual bool HasImplThread() const OVERRIDE;
195 virtual bool ShouldClearRootRenderPass() const OVERRIDE; 195 virtual bool ShouldClearRootRenderPass() const OVERRIDE;
196 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE; 196 virtual CompositorFrameMetadata MakeCompositorFrameMetadata() const OVERRIDE;
197 virtual bool AllowPartialSwap() const OVERRIDE; 197 virtual bool AllowPartialSwap() const OVERRIDE;
198 virtual gfx::Vector2d DeviceViewportOffset() const OVERRIDE;
enne (OOO) 2013/05/29 20:34:12 Unless I'm misunderstanding your requirements, it
198 199
199 // TileManagerClient implementation. 200 // TileManagerClient implementation.
200 virtual void ScheduleManageTiles() OVERRIDE; 201 virtual void ScheduleManageTiles() OVERRIDE;
201 virtual void DidInitializeVisibleTile() OVERRIDE; 202 virtual void DidInitializeVisibleTile() OVERRIDE;
202 virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const 203 virtual bool ShouldForceTileUploadsRequiredForActivationToComplete() const
203 OVERRIDE; 204 OVERRIDE;
204 205
205 // OutputSurfaceClient implementation. 206 // OutputSurfaceClient implementation.
207 virtual void SetDeviceTransformAndClip(const gfx::Transform& transform,
208 gfx::Rect clip) OVERRIDE;
206 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE; 209 virtual void SetNeedsRedrawRect(gfx::Rect rect) OVERRIDE;
207 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, 210 virtual void OnVSyncParametersChanged(base::TimeTicks timebase,
208 base::TimeDelta interval) OVERRIDE; 211 base::TimeDelta interval) OVERRIDE;
209 virtual void BeginFrame(base::TimeTicks frame_time) 212 virtual void BeginFrame(base::TimeTicks frame_time)
210 OVERRIDE; 213 OVERRIDE;
211 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack) 214 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack)
212 OVERRIDE; 215 OVERRIDE;
213 216
214 // Called from LayerTreeImpl. 217 // Called from LayerTreeImpl.
215 void OnCanDrawStateChangedForTree(); 218 void OnCanDrawStateChangedForTree();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 266
264 void SetViewportSize(gfx::Size device_viewport_size); 267 void SetViewportSize(gfx::Size device_viewport_size);
265 gfx::Size device_viewport_size() const { return device_viewport_size_; } 268 gfx::Size device_viewport_size() const { return device_viewport_size_; }
266 269
267 void SetOverdrawBottomHeight(float overdraw_bottom_height); 270 void SetOverdrawBottomHeight(float overdraw_bottom_height);
268 float overdraw_bottom_height() const { return overdraw_bottom_height_; } 271 float overdraw_bottom_height() const { return overdraw_bottom_height_; }
269 272
270 void SetDeviceScaleFactor(float device_scale_factor); 273 void SetDeviceScaleFactor(float device_scale_factor);
271 float device_scale_factor() const { return device_scale_factor_; } 274 float device_scale_factor() const { return device_scale_factor_; }
272 275
276 gfx::Rect DeviceClip() const;
277 gfx::Transform DeviceTransform() const;
278
273 scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas(); 279 scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas();
274 280
275 bool needs_animate_layers() const { 281 bool needs_animate_layers() const {
276 return !animation_registrar_->active_animation_controllers().empty(); 282 return !animation_registrar_->active_animation_controllers().empty();
277 } 283 }
278 284
279 void SendManagedMemoryStats( 285 void SendManagedMemoryStats(
280 size_t memory_visible_bytes, 286 size_t memory_visible_bytes,
281 size_t memory_visible_and_nearby_bytes, 287 size_t memory_visible_and_nearby_bytes,
282 size_t memory_use_bytes); 288 size_t memory_use_bytes);
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 497
492 // The maximum memory that would be used by the prioritized resource 498 // The maximum memory that would be used by the prioritized resource
493 // manager, if there were no limit on memory usage. 499 // manager, if there were no limit on memory usage.
494 size_t max_memory_needed_bytes_; 500 size_t max_memory_needed_bytes_;
495 501
496 size_t last_sent_memory_visible_bytes_; 502 size_t last_sent_memory_visible_bytes_;
497 size_t last_sent_memory_visible_and_nearby_bytes_; 503 size_t last_sent_memory_visible_and_nearby_bytes_;
498 size_t last_sent_memory_use_bytes_; 504 size_t last_sent_memory_use_bytes_;
499 505
500 gfx::Rect viewport_damage_rect_; 506 gfx::Rect viewport_damage_rect_;
507 gfx::Rect device_clip_;
508 gfx::Transform device_transform_;
501 509
502 base::TimeTicks current_frame_timeticks_; 510 base::TimeTicks current_frame_timeticks_;
503 base::Time current_frame_time_; 511 base::Time current_frame_time_;
504 512
505 scoped_ptr<AnimationRegistrar> animation_registrar_; 513 scoped_ptr<AnimationRegistrar> animation_registrar_;
506 514
507 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 515 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
508 516
509 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 517 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
510 }; 518 };
511 519
512 } // namespace cc 520 } // namespace cc
513 521
514 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 522 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698