Avi Drissman | 3e1a26c | 2022-09-15 20:26:03 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
[email protected] | 98a33e2 | 2012-07-03 03:35:31 | [diff] [blame] | 2 | // 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] | 98a33e2 | 2012-07-03 03:35:31 | [diff] [blame] | 7 | |
Kalvin Lee | 7d17d557 | 2024-11-10 13:52:45 | [diff] [blame] | 8 | #include "base/component_export.h" |
[email protected] | 98a33e2 | 2012-07-03 03:35:31 | [diff] [blame] | 9 | |
10 | namespace gfx { | ||||
11 | |||||
12 | class ImageSkiaRep; | ||||
13 | |||||
Kalvin Lee | 7d17d557 | 2024-11-10 13:52:45 | [diff] [blame] | 14 | class COMPONENT_EXPORT(GFX) ImageSkiaSource { |
[email protected] | 98a33e2 | 2012-07-03 03:35:31 | [diff] [blame] | 15 | public: |
pkasting | 0c287a3 | 2016-03-30 23:04:14 | [diff] [blame] | 16 | virtual ~ImageSkiaSource(); |
[email protected] | 98a33e2 | 2012-07-03 03:35:31 | [diff] [blame] | 17 | |
[email protected] | 50b6626 | 2013-09-24 03:25:48 | [diff] [blame] | 18 | // 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; | ||||
pkasting | 0c287a3 | 2016-03-30 23:04:14 | [diff] [blame] | 23 | |
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] | 98a33e2 | 2012-07-03 03:35:31 | [diff] [blame] | 27 | }; |
28 | |||||
29 | } // namespace gfx | ||||
30 | |||||
31 | #endif // UI_GFX_IMAGE_IMAGE_SKIA_SOURCE_H_ |