diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/platform/graphics/skia/NativeImageSkia.h')
-rw-r--r-- | chromium/third_party/WebKit/Source/platform/graphics/skia/NativeImageSkia.h | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/chromium/third_party/WebKit/Source/platform/graphics/skia/NativeImageSkia.h b/chromium/third_party/WebKit/Source/platform/graphics/skia/NativeImageSkia.h index 97b7bcd76bd..aebf1d1a4b8 100644 --- a/chromium/third_party/WebKit/Source/platform/graphics/skia/NativeImageSkia.h +++ b/chromium/third_party/WebKit/Source/platform/graphics/skia/NativeImageSkia.h @@ -52,20 +52,6 @@ class FloatRect; class FloatSize; class GraphicsContext; -// Used by computeResamplingMode to tell how bitmaps should be resampled. -enum ResamplingMode { - // Nearest neighbor resampling. Used when we detect that the page is - // trying to make a pattern by stretching a small bitmap very large. - NoResampling, - - // Default skia resampling. Used for large growing of images where high - // quality resampling doesn't get us very much except a slowdown. - LinearResampling, - - // High quality resampling. - AwesomeResampling, -}; - // This object is used as the "native image" in our port. When WebKit uses // PassNativeImagePtr / NativeImagePtr, it is a smart pointer to this type. // It has an SkBitmap, and also stores a cached resized image. @@ -98,18 +84,11 @@ public: // resized version if there is one. int decodedSize() const; - // Sets the immutable flag on the bitmap, indicating that the image data - // will not be modified any further. This is called by the image decoder - // when all data is complete, used by us to know whether we can cache - // resized images, and used by Skia for various optimizations. - void setDataComplete() { m_image.setImmutable(); } - // Returns true if the entire image has been decoded. bool isDataComplete() const { return m_image.isImmutable(); } // Get reference to the internal SkBitmap representing this image. const SkBitmap& bitmap() const { return m_image; } - SkBitmap& bitmap() { return m_image; } // We can keep a resized version of the bitmap cached on this object. // This function will return true if there is a cached version of the given @@ -173,7 +152,7 @@ private: // entire thing, it's best to just do it up front. bool shouldCacheResampling(const SkISize& scaledImageSize, const SkIRect& scaledImageSubset) const; - ResamplingMode computeResamplingMode(const SkMatrix&, float srcWidth, float srcHeight, float destWidth, float destHeight) const; + InterpolationQuality computeInterpolationQuality(const SkMatrix&, float srcWidth, float srcHeight, float destWidth, float destHeight) const; SkBitmap extractScaledImageFragment(const SkRect& srcRect, float scaleX, float scaleY, SkRect* scaledSrcRect) const; void drawResampledBitmap(GraphicsContext*, SkPaint&, const SkRect& srcRect, const SkRect& destRect) const; |