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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/ImageOrientation.h

Issue 1413593012: Record UMA stats for Blink decoded image orientation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase patch Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 return static_cast<ImageOrientationEnum>(exifValue); 77 return static_cast<ImageOrientationEnum>(exifValue);
78 } 78 }
79 79
80 // This transform can be used for drawing an image according to the orientat ion. 80 // This transform can be used for drawing an image according to the orientat ion.
81 // It should be used in a right-handed coordinate system. 81 // It should be used in a right-handed coordinate system.
82 AffineTransform transformFromDefault(const FloatSize& drawnSize) const; 82 AffineTransform transformFromDefault(const FloatSize& drawnSize) const;
83 83
84 inline bool operator==(const ImageOrientation& other) const { return other.m _orientation == m_orientation; } 84 inline bool operator==(const ImageOrientation& other) const { return other.m _orientation == m_orientation; }
85 inline bool operator!=(const ImageOrientation& other) const { return !(*this == other); } 85 inline bool operator!=(const ImageOrientation& other) const { return !(*this == other); }
86 86
87 ImageOrientationEnum orientation() const { return m_orientation; }
88
87 private: 89 private:
88 // FIXME: This only needs to be one byte. 90 // FIXME: This only needs to be one byte.
89 ImageOrientationEnum m_orientation; 91 ImageOrientationEnum m_orientation;
90 }; 92 };
91 93
92 } // namespace blink 94 } // namespace blink
93 95
94 #endif // ImageOrientation_h 96 #endif // ImageOrientation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698