WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
31219
Clean up GraphicsContext's current concept of ColorSpace
https://bugs.webkit.org/show_bug.cgi?id=31219
Summary
Clean up GraphicsContext's current concept of ColorSpace
Beth Dakin
Reported
2009-11-06 17:44:55 PST
Current GraphicsContexts is host to an enumeration called "ColorSpace," and the GraphicsContext state keeps track of a strokeColorSpace and a fillColorSpace. The problem is that the values of ColorSpace -- SolidColorSpace, PatternColorSpace, and GradientColorSpace -- are not actually color spaces. CG is confusing, and that is how this error was made and stayed in the code for so long. I am about to add real ColorSpace support <
https://bugs.webkit.org/show_bug.cgi?id=31196
>, but first we think it's best to clean up GraphicsContext. I will post a patch shortly to do this.
Attachments
Patch
(19.67 KB, patch)
2009-11-06 18:09 PST
,
Beth Dakin
adele
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Beth Dakin
Comment 1
2009-11-06 18:09:26 PST
Created
attachment 42681
[details]
Patch Darin is likely to be at least a little disappointed in this patch since it is more conservative than some other options we discussed for this cleanup. Specifically, Darin noticed that once we have a Pattern or Gradient on the GraphicsContext, we keep a pointer to it forever. I wrote code that would get rid of old Patterns and Gradients once something that is not a Pattern or Gradient is set, but a bunch of canvas pattern tests failed. I haven't investigated the failures closely enough to know whether or not clearing out the pattern is an option or not. Ultimately, it seems like that is just a bigger problem than we are trying to solve today, and I will file a follow-up bug so we can take a look at it later.
Adele Peterson
Comment 2
2009-11-06 18:25:29 PST
Comment on
attachment 42681
[details]
Patch Seems like a fine initial step for cleanup. r=me
Darin Adler
Comment 3
2009-11-06 18:52:07 PST
(In reply to
comment #1
)
> Darin is likely to be at least a little disappointed in this patch since it is > more conservative than some other options we discussed for this cleanup.
I'm pretty happy with it.
> I wrote code that would get > rid of old Patterns and Gradients once something that is not a Pattern or > Gradient is set, but a bunch of canvas pattern tests failed.
I'll play with that myself if I have some free time. It doesn't seem important to tackle it any time soon -- you can get on to the color space work!
Beth Dakin
Comment 4
2009-11-07 00:00:42 PST
Yay! Thanks Adele and Darin. Fixed with
r50614
.
Dimitri Glazkov (Google)
Comment 5
2009-11-08 10:57:19 PST
No Skia changes? :-\
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug