Re: [PATCH 3/3] Adjust assertions and checks to handle more pixel formats

LRN <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On 17.04.2014 13:46, Uli Schlachter wrote:
> On 17.04.2014 11:07, LRN wrote:
>> Now that ARGB32 format is available, allow it to be used, and use it
>> where appropriate.
> 
> I would squash this into the previous commit. Without this, the previous commit
> just adds some really broken API.

OK.

> 
> Also, why is this patch correct? Are you sure that all of this code really
> handles the ARGB32 format correctly?

No, i'm not sure.

> 
>> Signed-off-by: Руслан Ижбулатов <[email protected]>
>> ---
>>  src/win32/cairo-win32-display-surface.c | 4 ++--
>>  src/win32/cairo-win32-surface.c         | 2 +-
>>  2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/win32/cairo-win32-display-surface.c b/src/win32/cairo-win32-display-surface.c
>> index d002ce2..5c01721 100644
>> --- a/src/win32/cairo-win32-display-surface.c
>> +++ b/src/win32/cairo-win32-display-surface.c
>> @@ -372,7 +372,7 @@ _cairo_win32_display_surface_create_similar (void	    *abstract_src,
>>       */
>>      if (!(src->is_dib || content & CAIRO_CONTENT_ALPHA)) {
>>  	/* try to create a ddb */
>> -	new_surf = cairo_win32_surface_create_with_ddb (src->win32.dc, CAIRO_FORMAT_RGB24, width, height);
>> +	new_surf = cairo_win32_surface_create_with_ddb (src->win32.dc, CAIRO_FORMAT_ARGB32, width, height);
> 
> I don't like this. It should only use ARGB32 when really necessary, not always.
> Since this was using RGB24 before, there must be cases when it is still enough
> to use RGB24.

Right...

-- 
O< ascii ribbon - stop html email! - www.asciiribbon.org
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.