Changeset 106274 in webkit
- Timestamp:
- Jan 30, 2012 12:01:39 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r106273 r106274 1 2012-01-26 Andy Estes <aestes@apple.com> 2 3 [Windows] Optionally invert colors when drawing to a WebView's backing store. 4 https://bugs.webkit.org/show_bug.cgi?id=77168 5 6 Reviewed by Sam Weinig. 7 8 * css/CSSPrimitiveValueMappings.h: Assert that CompositeDifference is 9 not converted to a CSS value. Exposing a new compositing operation to 10 CSS is outside the scope of this patch. 11 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): 12 * platform/graphics/GraphicsTypes.h: Add CompositeDifference as a 13 CompositeOperator. Also, remove an outdated comment. 14 * platform/graphics/cg/GraphicsContextCG.cpp: 15 (WebCore::GraphicsContext::setPlatformCompositeOperation): Map 16 CompositeDifference to kCGBlendModeDifference. 17 1 18 2012-01-28 Matthew Delaney <mdelaney@apple.com> 2 19 -
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r105694 r106274 286 286 m_value.ident = CSSValuePlusLighter; 287 287 break; 288 case CompositeDifference: 289 ASSERT_NOT_REACHED(); 290 break; 288 291 } 289 292 } -
trunk/Source/WebCore/platform/graphics/GraphicsTypes.h
r88144 r106274 31 31 namespace WebCore { 32 32 33 // Note: These constants exactly match the NSCompositeOperator constants of34 // AppKit on Mac OS X Tiger. If these ever change, we'll need to change the35 // Mac OS X Tiger platform code to map one to the other.36 33 enum CompositeOperator { 37 34 CompositeClear, … … 47 44 CompositeXOR, 48 45 CompositePlusDarker, 49 CompositePlusLighter 46 CompositePlusLighter, 47 CompositeDifference 50 48 }; 51 49 -
trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
r106273 r106274 1604 1604 target = kCGBlendModePlusLighter; 1605 1605 break; 1606 case CompositeDifference: 1607 target = kCGBlendModeDifference; 1608 break; 1606 1609 } 1607 1610 CGContextSetBlendMode(platformContext(), target); -
trunk/Source/WebKit/win/ChangeLog
r105757 r106274 1 2012-01-26 Andy Estes <aestes@apple.com> 2 3 [Windows] Optionally invert colors when drawing to a WebView's backing store. 4 https://bugs.webkit.org/show_bug.cgi?id=77168 5 6 Reviewed by Sam Weinig. 7 8 * WebView.cpp: 9 (WebView::WebView): Initialize m_shouldInvertColors to false. 10 (WebView::paintIntoBackingStore): If m_shouldInvertColors is true, draw 11 an opaque white quad using the CompositeDifference blend mode. This 12 blend operation instructs CoreGraphics to take the difference between 13 the source pixel (white) and the background pixel, resulting in an 14 inverted pixel. 15 * WebView.h: Define m_shouldInvertColors. 16 1 17 2012-01-23 Simon Fraser <simon.fraser@apple.com> 2 18 -
trunk/Source/WebKit/win/WebView.cpp
r105757 r106274 333 333 WebView::WebView() 334 334 : m_refCount(0) 335 , m_shouldInvertColors(false) 335 336 #if !ASSERT_DISABLED 336 337 , m_deletionHasBegun(false) … … 1155 1156 gc.clip(dirtyRect); 1156 1157 frameView->paint(&gc, dirtyRect); 1158 if (m_shouldInvertColors) 1159 gc.fillRect(dirtyRect, Color::white, ColorSpaceDeviceRGB, CompositeDifference); 1157 1160 } 1158 1161 gc.restore(); -
trunk/Source/WebKit/win/WebView.h
r105757 r106274 1002 1002 #endif 1003 1003 1004 bool m_shouldInvertColors; 1005 1004 1006 protected: 1005 1007 static bool registerWebViewWindowClass();
Note: See TracChangeset
for help on using the changeset viewer.