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 | |
[email protected] | 50b6626 | 2013-09-24 03:25:48 | [diff] [blame] | 8 | |
[email protected] | d34e407 | 2013-09-05 20:28:30 | [diff] [blame] | 9 | #include "ui/gfx/gfx_export.h" |
[email protected] | 98a33e2 | 2012-07-03 03:35:31 | [diff] [blame] | 10 | |
11 | namespace gfx { | ||||
12 | |||||
13 | class ImageSkiaRep; | ||||
14 | |||||
[email protected] | 4ffa789 | 2013-09-27 16:56:06 | [diff] [blame] | 15 | class GFX_EXPORT ImageSkiaSource { |
[email protected] | 98a33e2 | 2012-07-03 03:35:31 | [diff] [blame] | 16 | public: |
pkasting | 0c287a3 | 2016-03-30 23:04:14 | [diff] [blame] | 17 | virtual ~ImageSkiaSource(); |
[email protected] | 98a33e2 | 2012-07-03 03:35:31 | [diff] [blame] | 18 | |
[email protected] | 50b6626 | 2013-09-24 03:25:48 | [diff] [blame] | 19 | // Returns the ImageSkiaRep for the given |scale|. ImageSkia caches the |
20 | // returned ImageSkiaRep and calls this method only if it doesn't have | ||||
21 | // ImageSkiaRep for given |scale|. There is no need for the implementation to | ||||
22 | // cache the image. | ||||
23 | virtual gfx::ImageSkiaRep GetImageForScale(float scale) = 0; | ||||
pkasting | 0c287a3 | 2016-03-30 23:04:14 | [diff] [blame] | 24 | |
25 | // Subclasses should override this to return true when they are capable of | ||||
26 | // providing an exact representation at any desired scale factor. | ||||
27 | virtual bool HasRepresentationAtAllScales() const; | ||||
[email protected] | 98a33e2 | 2012-07-03 03:35:31 | [diff] [blame] | 28 | }; |
29 | |||||
30 | } // namespace gfx | ||||
31 | |||||
32 | #endif // UI_GFX_IMAGE_IMAGE_SKIA_SOURCE_H_ |