Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 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 CC_PICTURE_PILE_IMPL_H_ | 5 #ifndef CC_PICTURE_PILE_IMPL_H_ |
| 6 #define CC_PICTURE_PILE_IMPL_H_ | 6 #define CC_PICTURE_PILE_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
|
reveman
2012/12/11 05:07:18
nit: add #include <list>
qinmin
2012/12/11 05:36:20
Done.
| |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
| 13 #include "cc/cc_export.h" | 13 #include "cc/cc_export.h" |
| 14 #include "cc/picture.h" | 14 #include "cc/picture.h" |
| 15 #include "cc/picture_pile.h" | 15 #include "cc/picture_pile.h" |
| 16 #include "cc/scoped_ptr_vector.h" | 16 #include "cc/scoped_ptr_vector.h" |
| 17 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 18 | 18 |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 31 | 31 |
| 32 // Raster a subrect of this PicturePileImpl into the given canvas. | 32 // Raster a subrect of this PicturePileImpl into the given canvas. |
| 33 // It's only safe to call paint on a cloned version. | 33 // It's only safe to call paint on a cloned version. |
| 34 // It is assumed that contentsScale has already been applied to this canvas. | 34 // It is assumed that contentsScale has already been applied to this canvas. |
| 35 void Raster( | 35 void Raster( |
| 36 SkCanvas* canvas, | 36 SkCanvas* canvas, |
| 37 gfx::Rect content_rect, | 37 gfx::Rect content_rect, |
| 38 float contents_scale, | 38 float contents_scale, |
| 39 RenderingStats* stats); | 39 RenderingStats* stats); |
| 40 | 40 |
| 41 void GatherPixelRefs(const gfx::Rect&, std::list<skia::LazyPixelRef*>&); | |
| 42 | |
| 41 private: | 43 private: |
| 42 friend class PicturePile; | 44 friend class PicturePile; |
| 43 | 45 |
| 44 PicturePileImpl(); | 46 PicturePileImpl(); |
| 45 ~PicturePileImpl(); | 47 ~PicturePileImpl(); |
| 46 | 48 |
| 47 PicturePile::Pile pile_; | 49 PicturePile::Pile pile_; |
| 48 | 50 |
| 49 typedef std::map<base::PlatformThreadId, scoped_refptr<PicturePileImpl> > | 51 typedef std::map<base::PlatformThreadId, scoped_refptr<PicturePileImpl> > |
| 50 CloneMap; | 52 CloneMap; |
| 51 CloneMap clones_; | 53 CloneMap clones_; |
| 52 | 54 |
| 53 friend class base::RefCounted<PicturePileImpl>; | 55 friend class base::RefCounted<PicturePileImpl>; |
| 54 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); | 56 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 } // namespace cc | 59 } // namespace cc |
| 58 | 60 |
| 59 #endif // CC_PICTURE_PILE_IMPL_H_ | 61 #endif // CC_PICTURE_PILE_IMPL_H_ |
| OLD | NEW |