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

Side by Side Diff: ui/compositor/layer.h

Issue 1057873004: Pass a ui::PaintContext from ui::Layer to layer delegates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layer-paintcontext: mac Created 5 years, 8 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
« no previous file with comments | « ui/aura_extra/image_window_delegate.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 scoped_ptr<cc::SingleReleaseCallback>* release_callback, 355 scoped_ptr<cc::SingleReleaseCallback>* release_callback,
356 bool use_shared_memory) override; 356 bool use_shared_memory) override;
357 357
358 float device_scale_factor() const { return device_scale_factor_; } 358 float device_scale_factor() const { return device_scale_factor_; }
359 359
360 // Forces a render surface to be used on this layer. This has no positive 360 // Forces a render surface to be used on this layer. This has no positive
361 // impact, and is only used for benchmarking/testing purpose. 361 // impact, and is only used for benchmarking/testing purpose.
362 void SetForceRenderSurface(bool force); 362 void SetForceRenderSurface(bool force);
363 bool force_render_surface() const { return force_render_surface_; } 363 bool force_render_surface() const { return force_render_surface_; }
364 364
365 // TODO(danakj): Plumb this to the LayerDelegate::OnPaintLayer instead of
366 // providing it here. For more win, use the full damage region instead of a
367 // bounding rect.
368 gfx::Rect PaintRect() const;
369
370 // LayerClient 365 // LayerClient
371 scoped_refptr<base::trace_event::ConvertableToTraceFormat> TakeDebugInfo() 366 scoped_refptr<base::trace_event::ConvertableToTraceFormat> TakeDebugInfo()
372 override; 367 override;
373 368
374 // LayerAnimationEventObserver 369 // LayerAnimationEventObserver
375 void OnAnimationStarted(const cc::AnimationEvent& event) override; 370 void OnAnimationStarted(const cc::AnimationEvent& event) override;
376 371
377 // Whether this layer has animations waiting to get sent to its cc::Layer. 372 // Whether this layer has animations waiting to get sent to its cc::Layer.
378 bool HasPendingThreadedAnimations() { 373 bool HasPendingThreadedAnimations() {
379 return pending_threaded_animations_.size() != 0; 374 return pending_threaded_animations_.size() != 0;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 cc::TextureMailbox mailbox_; 522 cc::TextureMailbox mailbox_;
528 523
529 // The callback to release the mailbox. This is only set after 524 // The callback to release the mailbox. This is only set after
530 // SetTextureMailbox is called, before we give it to the TextureLayer. 525 // SetTextureMailbox is called, before we give it to the TextureLayer.
531 scoped_ptr<cc::SingleReleaseCallback> mailbox_release_callback_; 526 scoped_ptr<cc::SingleReleaseCallback> mailbox_release_callback_;
532 527
533 // The size of the frame or texture in DIP, set when SetShowDelegatedContent 528 // The size of the frame or texture in DIP, set when SetShowDelegatedContent
534 // or SetTextureMailbox was called. 529 // or SetTextureMailbox was called.
535 gfx::Size frame_size_in_dip_; 530 gfx::Size frame_size_in_dip_;
536 531
537 bool inside_paint_;
538 gfx::Rect paint_rect_;
539
540 DISALLOW_COPY_AND_ASSIGN(Layer); 532 DISALLOW_COPY_AND_ASSIGN(Layer);
541 }; 533 };
542 534
543 } // namespace ui 535 } // namespace ui
544 536
545 #endif // UI_COMPOSITOR_LAYER_H_ 537 #endif // UI_COMPOSITOR_LAYER_H_
OLDNEW
« no previous file with comments | « ui/aura_extra/image_window_delegate.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698