Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1915)

Unified Diff: Source/platform/graphics/BitmapImage.h

Issue 877553011: Unit test for non-default orientation images which don't produce pixels. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/DragImageTest.cpp ('k') | Source/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/BitmapImage.h
diff --git a/Source/platform/graphics/BitmapImage.h b/Source/platform/graphics/BitmapImage.h
index 0bdf4b88f492741e604eb2f6c4357b6d0ad896e1..c3cb3edf22c5bd5aa6b639548943a5b30b2e80fa 100644
--- a/Source/platform/graphics/BitmapImage.h
+++ b/Source/platform/graphics/BitmapImage.h
@@ -55,6 +55,9 @@ public:
return adoptRef(new BitmapImage(observer));
}
+ // This allows constructing a BitmapImage with a forced non-default orientation.
+ static PassRefPtr<BitmapImage> createWithOrientationForTesting(PassRefPtr<NativeImageSkia>, ImageOrientation);
+
virtual ~BitmapImage();
virtual bool isBitmapImage() const override;
@@ -96,7 +99,7 @@ private:
void updateSize() const;
-protected:
+private:
enum RepetitionCountStatus {
Unknown, // We haven't checked the source's repetition count.
Uncertain, // We have a repetition count, but it might be wrong (some GIFs have a count after the image data, and will report "loop once" until all data has been decoded).
@@ -165,7 +168,6 @@ protected:
virtual bool mayFillWithSolidColor() override;
virtual Color solidColor() const override;
-private:
ImageSource m_source;
mutable IntSize m_size; // The size to use for the overall image (will just be the size of the first image).
mutable IntSize m_sizeRespectingOrientation;
« no previous file with comments | « Source/platform/DragImageTest.cpp ('k') | Source/platform/graphics/BitmapImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698