OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 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 CC_PICTURE_H_ |
| 6 #define CC_PICTURE_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "cc/cc_export.h" |
| 11 #include "third_party/skia/include/core/SkPicture.h" |
| 12 #include "ui/gfx/rect.h" |
| 13 |
| 14 namespace cc { |
| 15 |
| 16 class ContentLayerClient; |
| 17 |
| 18 class CC_EXPORT Picture |
| 19 : public base::RefCountedThreadSafe<Picture> { |
| 20 public: |
| 21 scoped_refptr<Picture> create(ContentLayerClient*, gfx::Rect); |
| 22 |
| 23 const gfx::Rect& rect(); |
| 24 scoped_refptr<Picture> clone(); |
| 25 |
| 26 protected: |
| 27 Picture(); |
| 28 ~Picture(); |
| 29 |
| 30 gfx::Rect m_rect; |
| 31 SkPicture m_picture; |
| 32 |
| 33 private: |
| 34 friend class base::RefCountedThreadSafe<Picture>; |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(Picture); |
| 37 }; |
| 38 |
| 39 } // namespace cc |
| 40 |
| 41 #endif // CC_PICTURE_H_ |
OLD | NEW |