Changeset 141284 in webkit
- Timestamp:
- Jan 30, 2013 10:52:42 AM (11 years ago)
- Location:
- trunk/Source/WebKit/blackberry
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/blackberry/Api/BackingStore.cpp
r140477 r141284 1913 1913 float heightScale = static_cast<float>(destinationSize.height()) / contentsRect.height(); 1914 1914 1915 if (widthScale != 1.0 && heightScale != 1.0) { 1915 // Don't scale the transformed content rect when the content is smaller than the destination 1916 if (widthScale < 1.0 && heightScale < 1.0) { 1916 1917 TransformationMatrix matrix; 1917 1918 matrix.scaleNonUniform(1.0 / widthScale, 1.0 / heightScale); 1918 1919 transformedContentsRect = matrix.mapRect(transformedContentsRect); 1919 1920 1920 // We extract from the contentsRect but draw a slightly larger region than 1921 1921 // we were told to, in order to avoid pixels being rendered only partially. 1922 1922 const int atLeastOneDevicePixel = static_cast<int>(ceilf(std::max(1.0 / widthScale, 1.0 / heightScale))); 1923 1923 transformedContentsRect.inflate(atLeastOneDevicePixel); 1924 } 1925 1926 if (widthScale != 1.0 && heightScale != 1.0) 1924 1927 graphicsContext.scale(FloatSize(widthScale, heightScale)); 1925 }1926 1928 1927 1929 graphicsContext.clip(transformedContentsRect); -
trunk/Source/WebKit/blackberry/ChangeLog
r141276 r141284 1 2013-01-30 Ed Baker <edbaker@rim.com> 2 3 [BlackBerry] Screenshot is clipped when content is smaller than the desintation size 4 https://bugs.webkit.org/show_bug.cgi?id=107735 5 6 Reviewed by Rob Buis. 7 8 Internal PR #284662 9 Don't scale the transformed content rect when the content is smaller than the destination 10 size. Scale the graphics context when it has a scale factor that isn't 1.0. 11 12 Internally reviewed by Andrew Lo 13 14 * Api/BackingStore.cpp: 15 (BlackBerry::WebKit::BackingStorePrivate::renderContents): 16 1 17 2013-01-30 Xiaobo Wang <xbwang@torchmobile.com.cn> 2 18
Note: See TracChangeset
for help on using the changeset viewer.