OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 15 matching lines...) Expand all Loading... |
26 #ifndef ScaledImageFragment_h | 26 #ifndef ScaledImageFragment_h |
27 #define ScaledImageFragment_h | 27 #define ScaledImageFragment_h |
28 | 28 |
29 #include "SkBitmap.h" | 29 #include "SkBitmap.h" |
30 #include "SkRect.h" | 30 #include "SkRect.h" |
31 #include "SkSize.h" | 31 #include "SkSize.h" |
32 | 32 |
33 #include "platform/PlatformExport.h" | 33 #include "platform/PlatformExport.h" |
34 #include "wtf/PassOwnPtr.h" | 34 #include "wtf/PassOwnPtr.h" |
35 | 35 |
36 namespace WebCore { | 36 namespace blink { |
37 | 37 |
38 // ScaledImageFragment is a scaled version of an image. | 38 // ScaledImageFragment is a scaled version of an image. |
39 class PLATFORM_EXPORT ScaledImageFragment { | 39 class PLATFORM_EXPORT ScaledImageFragment { |
40 public: | 40 public: |
41 enum ImageGeneration { | 41 enum ImageGeneration { |
42 CompleteImage = 0, | 42 CompleteImage = 0, |
43 FirstPartialImage = 1, | 43 FirstPartialImage = 1, |
44 }; | 44 }; |
45 | 45 |
46 static PassOwnPtr<ScaledImageFragment> createComplete(const SkISize& scaledS
ize, size_t index, const SkBitmap& bitmap) | 46 static PassOwnPtr<ScaledImageFragment> createComplete(const SkISize& scaledS
ize, size_t index, const SkBitmap& bitmap) |
(...skipping 16 matching lines...) Expand all Loading... |
63 const SkBitmap& bitmap() const { return m_bitmap; } | 63 const SkBitmap& bitmap() const { return m_bitmap; } |
64 SkBitmap& bitmap() { return m_bitmap; } | 64 SkBitmap& bitmap() { return m_bitmap; } |
65 | 65 |
66 private: | 66 private: |
67 SkISize m_scaledSize; | 67 SkISize m_scaledSize; |
68 size_t m_index; | 68 size_t m_index; |
69 size_t m_generation; | 69 size_t m_generation; |
70 SkBitmap m_bitmap; | 70 SkBitmap m_bitmap; |
71 }; | 71 }; |
72 | 72 |
73 } // namespace WebCore | 73 } // namespace blink |
74 | 74 |
75 #endif | 75 #endif |
OLD | NEW |