cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / cc / base / invalidation_region.h
blobfd061e8cba3d3b84065fd636994ebde12fb28332
1 // Copyright 2013 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.
5 #ifndef CC_BASE_INVALIDATION_REGION_H_
6 #define CC_BASE_INVALIDATION_REGION_H_
8 #include "cc/base/cc_export.h"
9 #include "cc/base/region.h"
10 #include "ui/gfx/rect.h"
12 namespace cc {
14 // This class behaves similarly to Region, but it may have false positives. That
15 // is, InvalidationRegion can be simplified to encompass a larger area than the
16 // collection of rects unioned.
17 class CC_EXPORT InvalidationRegion {
18 public:
19 InvalidationRegion();
20 ~InvalidationRegion();
22 void Swap(Region* region);
23 void Clear();
24 void Union(gfx::Rect rect);
26 private:
27 void SimplifyIfNeeded();
29 Region region_;
32 } // namespace cc
34 #endif // CC_BASE_INVALIDATION_REGION_H_