Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 SKIA_EXT_LAZY_PIXEL_REF_UTILS_H_ | 5 #ifndef SKIA_EXT_DISCARDABLE_PIXEL_REF_UTILS_H_ |
| 6 #define SKIA_EXT_LAZY_PIXEL_REF_UTILS_H_ | 6 #define SKIA_EXT_DISCARDABLE_PIXEL_REF_UTILS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "SkPicture.h" | 10 #include "SkPicture.h" |
| 11 #include "SkRect.h" | 11 #include "SkRect.h" |
| 12 | 12 |
| 13 namespace skia { | 13 namespace skia { |
| 14 | 14 |
| 15 class LazyPixelRef; | 15 class SK_API DiscardablePixelRefUtils { |
|
vmpstr
2013/12/20 17:41:06
What do you think of naming this PixelRefUtils and
reveman
2013/12/20 18:22:19
Good idea. Done.
| |
| 16 class SK_API LazyPixelRefUtils { | |
| 17 public: | 16 public: |
| 18 | 17 |
| 19 struct PositionLazyPixelRef { | 18 struct PositionPixelRef { |
| 20 skia::LazyPixelRef* lazy_pixel_ref; | 19 SkPixelRef* pixel_ref; |
| 21 SkRect pixel_ref_rect; | 20 SkRect pixel_ref_rect; |
| 22 }; | 21 }; |
| 23 | 22 |
| 24 static void GatherPixelRefs( | 23 static void GatherPixelRefs( |
| 25 SkPicture* picture, | 24 SkPicture* picture, |
| 26 std::vector<PositionLazyPixelRef>* lazy_pixel_refs); | 25 std::vector<PositionPixelRef>* pixel_refs); |
| 27 }; | 26 }; |
| 28 | 27 |
| 29 typedef std::vector<LazyPixelRefUtils::PositionLazyPixelRef> LazyPixelRefList; | 28 typedef std::vector<DiscardablePixelRefUtils::PositionPixelRef> |
| 29 DiscardablePixelRefList; | |
| 30 | 30 |
| 31 } // namespace skia | 31 } // namespace skia |
| 32 | 32 |
| 33 #endif | 33 #endif |
| OLD | NEW |