| OLD | NEW | 
|   1  |   1  | 
|   2 /* |   2 /* | 
|   3  * Copyright 2014 Google Inc. |   3  * Copyright 2014 Google Inc. | 
|   4  * |   4  * | 
|   5  * Use of this source code is governed by a BSD-style license that can be |   5  * Use of this source code is governed by a BSD-style license that can be | 
|   6  * found in the LICENSE file. |   6  * found in the LICENSE file. | 
|   7  */ |   7  */ | 
|   8 #include "gm.h" |   8 #include "gm.h" | 
|   9  |   9  | 
|  10 #include "Resources.h" |  10 #include "Resources.h" | 
| (...skipping 21 matching lines...) Expand all  Loading... | 
|  32  |  32  | 
|  33 protected: |  33 protected: | 
|  34     SkString onShortName() SK_OVERRIDE { |  34     SkString onShortName() SK_OVERRIDE { | 
|  35         return SkString("tiledscaledbitmap"); |  35         return SkString("tiledscaledbitmap"); | 
|  36     } |  36     } | 
|  37  |  37  | 
|  38     SkISize onISize() SK_OVERRIDE { |  38     SkISize onISize() SK_OVERRIDE { | 
|  39         return SkISize::Make(1016, 616); |  39         return SkISize::Make(1016, 616); | 
|  40     } |  40     } | 
|  41  |  41  | 
|  42     uint32_t onGetFlags() const SK_OVERRIDE { |  | 
|  43         return kSkipTiled_Flag; |  | 
|  44     } |  | 
|  45  |  | 
|  46     static SkBitmap make_bm(int width, int height) { |  42     static SkBitmap make_bm(int width, int height) { | 
|  47         SkBitmap bm; |  43         SkBitmap bm; | 
|  48         bm.allocN32Pixels(width, height); |  44         bm.allocN32Pixels(width, height); | 
|  49         bm.eraseColor(SK_ColorTRANSPARENT); |  45         bm.eraseColor(SK_ColorTRANSPARENT); | 
|  50         SkCanvas canvas(bm); |  46         SkCanvas canvas(bm); | 
|  51         SkPaint paint; |  47         SkPaint paint; | 
|  52         paint.setAntiAlias(true); |  48         paint.setAntiAlias(true); | 
|  53         canvas.drawCircle(width/2.f, height/2.f, width/4.f, paint); |  49         canvas.drawCircle(width/2.f, height/2.f, width/4.f, paint); | 
|  54         return bm; |  50         return bm; | 
|  55     } |  51     } | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
|  79     SkBitmap fBitmap; |  75     SkBitmap fBitmap; | 
|  80  |  76  | 
|  81     typedef GM INHERITED; |  77     typedef GM INHERITED; | 
|  82 }; |  78 }; | 
|  83  |  79  | 
|  84 ////////////////////////////////////////////////////////////////////////////// |  80 ////////////////////////////////////////////////////////////////////////////// | 
|  85  |  81  | 
|  86 DEF_GM(return SkNEW(TiledScaledBitmapGM);) |  82 DEF_GM(return SkNEW(TiledScaledBitmapGM);) | 
|  87  |  83  | 
|  88 } |  84 } | 
| OLD | NEW |