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

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

Issue 962833003: UI impl side painting default on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm unused layer unittest from compositor unittest Created 5 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) 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_DELEGATE_H_ 5 #ifndef UI_COMPOSITOR_LAYER_DELEGATE_H_
6 #define UI_COMPOSITOR_LAYER_DELEGATE_H_ 6 #define UI_COMPOSITOR_LAYER_DELEGATE_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "ui/compositor/compositor_export.h" 9 #include "ui/compositor/compositor_export.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 class Canvas; 12 class Canvas;
13 class Rect; 13 class Rect;
14 } 14 }
15 15
16 namespace ui { 16 namespace ui {
17 17
18 // A delegate interface implemented by an object that renders to a Layer. 18 // A delegate interface implemented by an object that renders to a Layer.
19 class COMPOSITOR_EXPORT LayerDelegate { 19 class COMPOSITOR_EXPORT LayerDelegate {
20 public: 20 public:
21 // Paint content for the layer to the specified canvas. It has already been 21 // Paint content for the layer to the specified canvas. It has already been
22 // clipped to the Layer's invalid rect. 22 // clipped to the Layer's invalid rect. In Impl-Side Painting, canvas's rect
enne (OOO) 2015/03/02 21:59:27 I think this comment change leaks implementation d
weiliangc 2015/03/02 22:37:22 Done.
23 // would be to closest tile size.
23 virtual void OnPaintLayer(gfx::Canvas* canvas) = 0; 24 virtual void OnPaintLayer(gfx::Canvas* canvas) = 0;
24 25
25 // A notification that this layer has had a delegated frame swap and 26 // A notification that this layer has had a delegated frame swap and
26 // will be repainted. 27 // will be repainted.
27 virtual void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) = 0; 28 virtual void OnDelegatedFrameDamage(const gfx::Rect& damage_rect_in_dip) = 0;
28 29
29 // Called when the layer's device scale factor has changed. 30 // Called when the layer's device scale factor has changed.
30 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0; 31 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) = 0;
31 32
32 // Invoked prior to the bounds changing. The returned closured is run after 33 // Invoked prior to the bounds changing. The returned closured is run after
33 // the bounds change. 34 // the bounds change.
34 virtual base::Closure PrepareForLayerBoundsChange() = 0; 35 virtual base::Closure PrepareForLayerBoundsChange() = 0;
35 36
36 protected: 37 protected:
37 virtual ~LayerDelegate() {} 38 virtual ~LayerDelegate() {}
38 }; 39 };
39 40
40 } // namespace ui 41 } // namespace ui
41 42
42 #endif // UI_COMPOSITOR_LAYER_DELEGATE_H_ 43 #endif // UI_COMPOSITOR_LAYER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698