blob: 7858bc0ada0041cf3f25c2a852411a5029aa2517 [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
[email protected]50b66262013-09-24 03:25:488
[email protected]d34e4072013-09-05 20:28:309#include "ui/gfx/gfx_export.h"
[email protected]98a33e22012-07-03 03:35:3110
11namespace gfx {
12
13class ImageSkiaRep;
14
[email protected]4ffa7892013-09-27 16:56:0615class GFX_EXPORT ImageSkiaSource {
[email protected]98a33e22012-07-03 03:35:3116 public:
pkasting0c287a32016-03-30 23:04:1417 virtual ~ImageSkiaSource();
[email protected]98a33e22012-07-03 03:35:3118
[email protected]50b66262013-09-24 03:25:4819 // 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;
pkasting0c287a32016-03-30 23:04:1424
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]98a33e22012-07-03 03:35:3128};
29
30} // namespace gfx
31
32#endif // UI_GFX_IMAGE_IMAGE_SKIA_SOURCE_H_