blob: 38762bed52b6863878191c018c34e73d1d86735b [file] [log] [blame]
Avi Drissman3e1a26c2022-09-15 20:26:031// Copyright 2012 The Chromium Authors
[email protected]98a33e22012-07-03 03:35:312// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef UI_GFX_IMAGE_IMAGE_SKIA_SOURCE_H_
6#define UI_GFX_IMAGE_IMAGE_SKIA_SOURCE_H_
[email protected]98a33e22012-07-03 03:35:317
Kalvin Lee7d17d5572024-11-10 13:52:458#include "base/component_export.h"
[email protected]98a33e22012-07-03 03:35:319
10namespace gfx {
11
12class ImageSkiaRep;
13
Kalvin Lee7d17d5572024-11-10 13:52:4514class COMPONENT_EXPORT(GFX) ImageSkiaSource {
[email protected]98a33e22012-07-03 03:35:3115 public:
pkasting0c287a32016-03-30 23:04:1416 virtual ~ImageSkiaSource();
[email protected]98a33e22012-07-03 03:35:3117
[email protected]50b66262013-09-24 03:25:4818 // Returns the ImageSkiaRep for the given |scale|. ImageSkia caches the
19 // returned ImageSkiaRep and calls this method only if it doesn't have
20 // ImageSkiaRep for given |scale|. There is no need for the implementation to
21 // cache the image.
22 virtual gfx::ImageSkiaRep GetImageForScale(float scale) = 0;
pkasting0c287a32016-03-30 23:04:1423
24 // Subclasses should override this to return true when they are capable of
25 // providing an exact representation at any desired scale factor.
26 virtual bool HasRepresentationAtAllScales() const;
[email protected]98a33e22012-07-03 03:35:3127};
28
29} // namespace gfx
30
31#endif // UI_GFX_IMAGE_IMAGE_SKIA_SOURCE_H_