| 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 "SkBitmapFactory.h" | 9 #include "SkBitmapFactory.h" |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 } | 50 } |
| 51 | 51 |
| 52 virtual SkISize onISize() { | 52 virtual SkISize onISize() { |
| 53 return make_isize(640, 480); | 53 return make_isize(640, 480); |
| 54 } | 54 } |
| 55 | 55 |
| 56 virtual void onDraw(SkCanvas* canvas) { | 56 virtual void onDraw(SkCanvas* canvas) { |
| 57 canvas->drawBitmap(fBitmap, 0, 0); | 57 canvas->drawBitmap(fBitmap, 0, 0); |
| 58 } | 58 } |
| 59 | 59 |
| 60 // Skip cross process pipe due to https://code.google.com/p/skia/issues/deta
il?id=1520 |
| 61 virtual uint32_t onGetFlags() const { |
| 62 return INHERITED::onGetFlags() | kSkipPipeCrossProcess_Flag; |
| 63 } |
| 64 |
| 60 private: | 65 private: |
| 61 SkBitmap fBitmap; | 66 SkBitmap fBitmap; |
| 62 | 67 |
| 63 typedef GM INHERITED; | 68 typedef GM INHERITED; |
| 64 }; | 69 }; |
| 65 | 70 |
| 66 ////////////////////////////////////////////////////////////////////////////// | 71 ////////////////////////////////////////////////////////////////////////////// |
| 67 | 72 |
| 68 static GM* MyFactory(void*) { return new FactoryGM; } | 73 static GM* MyFactory(void*) { return new FactoryGM; } |
| 69 static GMRegistry reg(MyFactory); | 74 static GMRegistry reg(MyFactory); |
| 70 | 75 |
| 71 } | 76 } |
| OLD | NEW |