OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef VIEWS_ANIMATION_PAINT_LOCK_H_ | |
6 #define VIEWS_ANIMATION_PAINT_LOCK_H_ | |
7 #pragma once | |
8 | |
9 namespace views { | |
10 | |
11 class View; | |
12 | |
13 // Instances of PaintLock can be created to disable painting of the view | |
14 // (compositing is not disabled). When the class is destroyed, painting is | |
15 // re-enabled. This can be useful during operations like animations, that are | |
16 // sensitive to costly paints, and during which only composting, not painting, | |
17 // is required. | |
18 class PaintLock { | |
19 public: | |
20 // The paint lock does not own the view. It is an error for the view to be | |
21 // destroed before the lock. | |
sky
2011/08/25 21:10:12
destroed -> destroyed.
| |
22 PaintLock(View* view); | |
23 ~PaintLock(); | |
24 private: | |
sky
2011/08/25 21:10:12
nit: newline between 23 and 24.
| |
25 View* view_; | |
26 }; | |
sky
2011/08/25 21:10:12
DISALLOW_COPY_AND_ASSIGN.
| |
27 | |
28 } // namespace views | |
29 | |
30 #endif // VIEWS_ANIMATION_PAINT_LOCK_H_ | |
OLD | NEW |