Bug 75521

Summary: Implement hardware accelerated Brightness and contrast filters
Product: WebKit Reporter: BrianMB <anewpage.media>
Component: CSSAssignee: Chris Marrin <cmarrin>
Status: RESOLVED FIXED    
Severity: Normal CC: anewpage.media, macpherson, simon.fraser, thorton, webkit-bug-importer, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.7   
URL: http://jsfiddle.net/brianblakely/ntmAr/
Attachments:
Description Flags
Patch simon.fraser: review+

Description BrianMB 2012-01-03 21:34:59 PST
Test Case:
http://jsfiddle.net/brianblakely/ntmAr/

UA:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.15+ (KHTML, like Gecko) Version/5.1.2 Safari/534.52.7
Comment 1 Radar WebKit Bug Importer 2012-01-04 11:03:57 PST
<rdar://problem/10643206>
Comment 2 Chris Marrin 2012-01-17 15:35:53 PST
The real problem here is that the hardware accelerated brightness and contrast filters haven't been implemented yet. 

There is also a bug in PlatformCALayer::filtersCanBeComposited, where FilterOperation::GRAYSCALE was mistakenly included in the list of filters not accelerated. I will fix that when I do this implementation.
Comment 3 Chris Marrin 2012-01-20 17:52:37 PST
Created attachment 123420 [details]
Patch
Comment 4 Simon Fraser (smfr) 2012-01-20 17:58:40 PST
Comment on attachment 123420 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=123420&action=review

> Source/WebCore/ChangeLog:11
> +        It also changes the spec for the brightness filter to be additive rather than

Strictly speaking, it doesn't change the spec, but complies with suggested spec changes.

> Source/WebCore/css/CSSParser.cpp:6815
> -        // One optional argument, 0-1 or 0%-100%, if missing use 100%.
> +        // One optional argument, 0-1 or 0%-100%, if missing use 100%,

The old version of the comments seems correct.

> Source/WebCore/css/CSSParser.cpp:6826
>              // Saturate, Brightness and Contrast allow values over 100%.

Is this comment wrong now re: brightness?
Comment 5 Chris Marrin 2012-01-21 07:42:57 PST
Landed in https://trac.webkit.org/changeset/105576