Last Comment Bug 740570 - Add conversion functions between SurfaceFormats and ImageFormats
: Add conversion functions between SurfaceFormats and ImageFormats
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla14
Assigned To: George Wright (:gw280) (:gwright)
:
: Milan Sreckovic [:milan]
Mentors:
Depends on:
Blocks: 687187 740580
  Show dependency treegraph
 
Reported: 2012-03-29 13:20 PDT by George Wright (:gw280) (:gwright)
Modified: 2012-03-31 19:30 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Bug 740570 - Add conversion functions between SurfaceFormats and ImageFormats (1.06 KB, patch)
2012-03-29 14:17 PDT, George Wright (:gw280) (:gwright)
bas: review+
Details | Diff | Splinter Review

Description George Wright (:gw280) (:gwright) 2012-03-29 13:20:05 PDT
It'd be nice for gfx2DGlue to have conversion functions for converting between these two types.
Comment 1 George Wright (:gw280) (:gwright) 2012-03-29 14:17:27 PDT
Created attachment 610682 [details] [diff] [review]
Bug 740570 - Add conversion functions between SurfaceFormats and ImageFormats
Comment 2 Bas Schouten (:bas.schouten) 2012-03-30 12:35:54 PDT
Comment on attachment 610682 [details] [diff] [review]
Bug 740570 - Add conversion functions between SurfaceFormats and ImageFormats

Review of attachment 610682 [details] [diff] [review]:
-----------------------------------------------------------------

I guess this works :) Although the format->content->format trick makes me a little icky :)

::: gfx/thebes/gfx2DGlue.h
@@ +208,5 @@
> +}
> +
> +inline gfxASurface::gfxImageFormat ImageFormatForSurfaceFormat(SurfaceFormat aFormat)
> +{
> +  return gfxASurface::FormatFromContent(mozilla::gfx::ContentForFormat(aFormat));

No need for mozilla::gfx.
Comment 3 George Wright (:gw280) (:gwright) 2012-03-30 12:48:58 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/f7bf4d83eab6
Comment 4 George Wright (:gw280) (:gwright) 2012-03-30 12:49:26 PDT
Oh, oops, I only just saw the comment re. mozilla::gfx...
Comment 5 Ed Morley [:emorley] 2012-03-31 19:30:46 PDT
https://hg.mozilla.org/mozilla-central/rev/f7bf4d83eab6

Note You need to log in before you can comment on or make changes to this bug.