OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // | 91 // |
92 // scaledImageSubset | 92 // scaledImageSubset |
93 // Rectangle of the subset in the scaled image. | 93 // Rectangle of the subset in the scaled image. |
94 SkBitmap resizedBitmap(const SkISize& scaledImageSize, const SkIRect& scaled
ImageSubset) const; | 94 SkBitmap resizedBitmap(const SkISize& scaledImageSize, const SkIRect& scaled
ImageSubset) const; |
95 | 95 |
96 void draw( | 96 void draw( |
97 GraphicsContext*, | 97 GraphicsContext*, |
98 const SkRect& srcRect, | 98 const SkRect& srcRect, |
99 const SkRect& destRect, | 99 const SkRect& destRect, |
100 CompositeOperator, | 100 CompositeOperator, |
101 blink::WebBlendMode) const; | 101 WebBlendMode) const; |
102 | 102 |
103 void drawPattern( | 103 void drawPattern( |
104 GraphicsContext*, | 104 GraphicsContext*, |
105 const FloatRect& srcRect, | 105 const FloatRect& srcRect, |
106 const FloatSize& scale, | 106 const FloatSize& scale, |
107 const FloatPoint& phase, | 107 const FloatPoint& phase, |
108 CompositeOperator, | 108 CompositeOperator, |
109 const FloatRect& destRect, | 109 const FloatRect& destRect, |
110 blink::WebBlendMode, | 110 WebBlendMode, |
111 const IntSize& repeatSpacing) const; | 111 const IntSize& repeatSpacing) const; |
112 | 112 |
113 private: | 113 private: |
114 NativeImageSkia(); | 114 NativeImageSkia(); |
115 | 115 |
116 NativeImageSkia(const SkBitmap&); | 116 NativeImageSkia(const SkBitmap&); |
117 | 117 |
118 // ImageResourceInfo is used to uniquely identify cached or requested image | 118 // ImageResourceInfo is used to uniquely identify cached or requested image |
119 // resizes. | 119 // resizes. |
120 // Image resize is identified by the scaled image size and scaled image subs
et. | 120 // Image resize is identified by the scaled image size and scaled image subs
et. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 // This allows us to see if many requests have been made for the same | 163 // This allows us to see if many requests have been made for the same |
164 // resized image, we know that we should probably cache it, even if all of | 164 // resized image, we know that we should probably cache it, even if all of |
165 // those requests individually are small and would not otherwise be cached. | 165 // those requests individually are small and would not otherwise be cached. |
166 // | 166 // |
167 // We also track scaling information and destination subset for the scaled | 167 // We also track scaling information and destination subset for the scaled |
168 // image. See comments for ImageResourceInfo. | 168 // image. See comments for ImageResourceInfo. |
169 mutable ImageResourceInfo m_cachedImageInfo; | 169 mutable ImageResourceInfo m_cachedImageInfo; |
170 mutable int m_resizeRequests; | 170 mutable int m_resizeRequests; |
171 }; | 171 }; |
172 | 172 |
173 } | 173 } // namespace blink |
| 174 |
174 #endif // NativeImageSkia_h | 175 #endif // NativeImageSkia_h |
OLD | NEW |