• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2015 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkImageGeneratorUtils_DEFINED
9 #define SkImageGeneratorUtils_DEFINED
10 
11 #include "SkImageGenerator.h"
12 
13 class SkImage;
14 
15 class SkImageGeneratorUtils {
16 public:
17     // Returns a generator of the specified dimensions, but will always fail to return anything
18     static SkImageGenerator* NewEmpty(const SkImageInfo&);
19 
20     // If the bitmap is mutable, it will make a copy first
21     static SkImageGenerator* NewFromBitmap(const SkBitmap&);
22 
23     // Ref's the provided texture, so it had better be const!
24     static SkImageGenerator* NewFromTexture(GrContext*, GrTexture*);
25 
26     static SkImageGenerator* NewFromImage(const SkImage*);
27 };
28 
29 #endif
30