Commit fa117f24 authored by mgiuca's avatar mgiuca Committed by Commit bot

gfx::ImageSkia: Added a note about using this class vs ImageFamily.

This is the source of some confusion; ImageSkia has been abused in the
past for storing different logical image sizes, where an ImageFamily is
the appropriate class. This comment mirrors the comment in ImageFamily
explaining when Image/ImageSkia is appropriate vs ImageFamily.

Review URL: https://codereview.chromium.org/1438603003

Cr-Commit-Position: refs/heads/master@{#361067}
parent 289b0cf8
......@@ -33,6 +33,11 @@ class TestOnThread;
// Functions that mutate the image should operate on the gfx::ImageSkiaRep
// returned from ImageSkia::GetRepresentation, not on ImageSkia.
//
// NOTE: This class should *not* be used to store multiple logical sizes of an
// image (e.g., small, medium and large versions of an icon); use an ImageFamily
// for that. An ImageSkia represents an image of a single logical size, with
// potentially many different densities for high-DPI displays.
//
// ImageSkia is cheap to copy and intentionally supports copy semantics.
class GFX_EXPORT ImageSkia {
public:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment