Bug 75521 - Implement hardware accelerated Brightness and contrast filters
Summary: Implement hardware accelerated Brightness and contrast filters
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.7
: P2 Normal
Assignee: Chris Marrin
URL: http://jsfiddle.net/brianblakely/ntmAr/
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-01-03 21:34 PST by BrianMB
Modified: 2012-01-21 07:42 PST (History)
6 users (show)

See Also:


Attachments
Patch (446.12 KB, patch)
2012-01-20 17:52 PST, Chris Marrin
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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