Discussion:
[chromium-dev] gfx::Image vs. gfx::ImageSkia vs. SkBitmap...
Rachel Blum
2015-04-15 18:54:05 UTC
Permalink
I couldn't find any docs on this - is there a guideline what to use when?

AIUI:

* SkBitmap is a single bitmap. Use when actual bitmap manipulation is
required.

* gfx::ImageSkia can contain multiple bitmaps to support multiple scales.
Use when in Views land.

* gfx::Image can contain ImageSkia/NSImage/raw bytes - use when passing
around images in platform-indepdent code.

Does that make sense? Am I missing something obvious?
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Stephen Chenney
2015-04-15 20:20:15 UTC
Permalink
+skia-discuss, because the Skia team would like to transition from here to
somewhere else.

Stephen.
Post by Rachel Blum
I couldn't find any docs on this - is there a guideline what to use when?
* SkBitmap is a single bitmap. Use when actual bitmap manipulation is
required.
* gfx::ImageSkia can contain multiple bitmaps to support multiple scales.
Use when in Views land.
* gfx::Image can contain ImageSkia/NSImage/raw bytes - use when passing
around images in platform-indepdent code.
Does that make sense? Am I missing something obvious?
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Nico Weber
2015-04-15 20:23:25 UTC
Permalink
Your summary sounds right to me.
Post by Stephen Chenney
+skia-discuss, because the Skia team would like to transition from here to
somewhere else.
Stephen.
Post by Rachel Blum
I couldn't find any docs on this - is there a guideline what to use when?
* SkBitmap is a single bitmap. Use when actual bitmap manipulation is
required.
* gfx::ImageSkia can contain multiple bitmaps to support multiple
scales. Use when in Views land.
* gfx::Image can contain ImageSkia/NSImage/raw bytes - use when passing
around images in platform-indepdent code.
Does that make sense? Am I missing something obvious?
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Nico Weber
2015-04-15 20:24:32 UTC
Permalink
-skia-discuss as it'll send "you're not subscribed" errors to most people
replying her
Post by Nico Weber
Your summary sounds right to me.
Post by Stephen Chenney
+skia-discuss, because the Skia team would like to transition from here
to somewhere else.
Stephen.
Post by Rachel Blum
I couldn't find any docs on this - is there a guideline what to use when?
* SkBitmap is a single bitmap. Use when actual bitmap manipulation is
required.
* gfx::ImageSkia can contain multiple bitmaps to support multiple
scales. Use when in Views land.
* gfx::Image can contain ImageSkia/NSImage/raw bytes - use when passing
around images in platform-indepdent code.
Does that make sense? Am I missing something obvious?
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Nico Weber
2015-04-15 20:24:42 UTC
Permalink
e
Post by Nico Weber
-skia-discuss as it'll send "you're not subscribed" errors to most people
replying her
Post by Nico Weber
Your summary sounds right to me.
Post by Stephen Chenney
+skia-discuss, because the Skia team would like to transition from here
to somewhere else.
Stephen.
Post by Rachel Blum
I couldn't find any docs on this - is there a guideline what to use when?
* SkBitmap is a single bitmap. Use when actual bitmap manipulation is
required.
* gfx::ImageSkia can contain multiple bitmaps to support multiple
scales. Use when in Views land.
* gfx::Image can contain ImageSkia/NSImage/raw bytes - use when
passing around images in platform-indepdent code.
Does that make sense? Am I missing something obvious?
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
'Tom Hudson' via Chromium-dev
2015-04-15 20:50:37 UTC
Permalink
... because the Skia team would like to transition from here to somewhere
else.
There's also SkImage, a new alternative to SkBitmap which is designed to be
more friendly to GPU rendering.

I don't believe it's yet wrapped by gfx::Image or gfx::ImageSkia, but
shimming it in in place of SkBitmap would be a task to consider.

Tom
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Matt Giuca
2015-04-16 05:30:52 UTC
Permalink
To confuse things further, there's also gfx::ImageFamily, which I put in a
few years ago and sits at one level higher than gfx::Image.

While Image (and ImageSkia) contain multiple image scales (different DPIs
of the same logical image size), ImageFamily contains multiple Images at
different logical sizes. It is used for app icons, since an icon can
theoretically contain many different logical sizes, with each logical size
having many different DPIs.

On Thu, 16 Apr 2015 at 06:51 'Tom Hudson' via Chromium-dev <
Post by 'Tom Hudson' via Chromium-dev
... because the Skia team would like to transition from here to somewhere
else.
There's also SkImage, a new alternative to SkBitmap which is designed to
be more friendly to GPU rendering.
I don't believe it's yet wrapped by gfx::Image or gfx::ImageSkia, but
shimming it in in place of SkBitmap would be a task to consider.
Tom
--
--
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
Loading...