OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_COMPOSITOR_LAYER_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_H_ |
6 #define UI_COMPOSITOR_LAYER_H_ | 6 #define UI_COMPOSITOR_LAYER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 cc::Layer* cc_layer_for_testing() { return cc_layer_; } | 348 cc::Layer* cc_layer_for_testing() { return cc_layer_; } |
349 | 349 |
350 // TextureLayerClient | 350 // TextureLayerClient |
351 bool PrepareTextureMailbox( | 351 bool PrepareTextureMailbox( |
352 cc::TextureMailbox* mailbox, | 352 cc::TextureMailbox* mailbox, |
353 std::unique_ptr<cc::SingleReleaseCallback>* release_callback, | 353 std::unique_ptr<cc::SingleReleaseCallback>* release_callback, |
354 bool use_shared_memory) override; | 354 bool use_shared_memory) override; |
355 | 355 |
356 float device_scale_factor() const { return device_scale_factor_; } | 356 float device_scale_factor() const { return device_scale_factor_; } |
357 | 357 |
358 // Forces a render surface to be used on this layer. This has no positive | |
359 // impact, and is only used for benchmarking/testing purpose. | |
360 void SetForceRenderSurface(bool force); | |
361 bool force_render_surface() const { return force_render_surface_; } | |
362 | |
363 // LayerClient | 358 // LayerClient |
364 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> TakeDebugInfo( | 359 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> TakeDebugInfo( |
365 cc::Layer* layer) override; | 360 cc::Layer* layer) override; |
366 | 361 |
367 // Whether this layer has animations waiting to get sent to its cc::Layer. | 362 // Whether this layer has animations waiting to get sent to its cc::Layer. |
368 bool HasPendingThreadedAnimationsForTesting() const; | 363 bool HasPendingThreadedAnimationsForTesting() const; |
369 | 364 |
370 // Triggers a call to SwitchToLayer. | 365 // Triggers a call to SwitchToLayer. |
371 void SwitchCCLayerForTest(); | 366 void SwitchCCLayerForTest(); |
372 | 367 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 | 425 |
431 // This layer's children, in bottom-to-top stacking order. | 426 // This layer's children, in bottom-to-top stacking order. |
432 std::vector<Layer*> children_; | 427 std::vector<Layer*> children_; |
433 | 428 |
434 gfx::Rect bounds_; | 429 gfx::Rect bounds_; |
435 gfx::Vector2dF subpixel_position_offset_; | 430 gfx::Vector2dF subpixel_position_offset_; |
436 | 431 |
437 // Visibility of this layer. See SetVisible/IsDrawn for more details. | 432 // Visibility of this layer. See SetVisible/IsDrawn for more details. |
438 bool visible_; | 433 bool visible_; |
439 | 434 |
440 bool force_render_surface_; | |
441 | |
442 bool fills_bounds_opaquely_; | 435 bool fills_bounds_opaquely_; |
443 bool fills_bounds_completely_; | 436 bool fills_bounds_completely_; |
444 | 437 |
445 // Union of damaged rects, in layer space, to be used when compositor is ready | 438 // Union of damaged rects, in layer space, to be used when compositor is ready |
446 // to paint the content. | 439 // to paint the content. |
447 cc::Region damaged_region_; | 440 cc::Region damaged_region_; |
448 | 441 |
449 int background_blur_radius_; | 442 int background_blur_radius_; |
450 | 443 |
451 // Several variables which will change the visible representation of | 444 // Several variables which will change the visible representation of |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 // The size of the frame or texture in DIP, set when SetShowDelegatedContent | 500 // The size of the frame or texture in DIP, set when SetShowDelegatedContent |
508 // or SetTextureMailbox was called. | 501 // or SetTextureMailbox was called. |
509 gfx::Size frame_size_in_dip_; | 502 gfx::Size frame_size_in_dip_; |
510 | 503 |
511 DISALLOW_COPY_AND_ASSIGN(Layer); | 504 DISALLOW_COPY_AND_ASSIGN(Layer); |
512 }; | 505 }; |
513 | 506 |
514 } // namespace ui | 507 } // namespace ui |
515 | 508 |
516 #endif // UI_COMPOSITOR_LAYER_H_ | 509 #endif // UI_COMPOSITOR_LAYER_H_ |
OLD | NEW |