| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkData.h" | 10 #include "SkData.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 data, SkDecodingImageGenerator::Options()), | 41 data, SkDecodingImageGenerator::Options()), |
| 42 &fBitmap, pool)); | 42 &fBitmap, pool)); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 | 45 |
| 46 virtual SkString onShortName() { | 46 virtual SkString onShortName() { |
| 47 return SkString("factory"); | 47 return SkString("factory"); |
| 48 } | 48 } |
| 49 | 49 |
| 50 virtual SkISize onISize() { | 50 virtual SkISize onISize() { |
| 51 return make_isize(640, 480); | 51 return SkISize::Make(640, 480); |
| 52 } | 52 } |
| 53 | 53 |
| 54 virtual void onDraw(SkCanvas* canvas) { | 54 virtual void onDraw(SkCanvas* canvas) { |
| 55 canvas->drawBitmap(fBitmap, 0, 0); | 55 canvas->drawBitmap(fBitmap, 0, 0); |
| 56 } | 56 } |
| 57 | 57 |
| 58 // Skip cross process pipe due to https://code.google.com/p/skia/issues/deta
il?id=1520 | 58 // Skip cross process pipe due to https://code.google.com/p/skia/issues/deta
il?id=1520 |
| 59 virtual uint32_t onGetFlags() const { | 59 virtual uint32_t onGetFlags() const { |
| 60 return INHERITED::onGetFlags() | kSkipPipeCrossProcess_Flag; | 60 return INHERITED::onGetFlags() | kSkipPipeCrossProcess_Flag; |
| 61 } | 61 } |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 SkBitmap fBitmap; | 64 SkBitmap fBitmap; |
| 65 | 65 |
| 66 typedef GM INHERITED; | 66 typedef GM INHERITED; |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 ////////////////////////////////////////////////////////////////////////////// | 69 ////////////////////////////////////////////////////////////////////////////// |
| 70 | 70 |
| 71 static GM* MyFactory(void*) { return new FactoryGM; } | 71 static GM* MyFactory(void*) { return new FactoryGM; } |
| 72 static GMRegistry reg(MyFactory); | 72 static GMRegistry reg(MyFactory); |
| 73 | 73 |
| 74 } // namespace skiagm | 74 } // namespace skiagm |
| OLD | NEW |