| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BD-style license that can be | 4 * Use of this source code is governed by a BD-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 | 9 |
| 10 #if SK_SUPPORT_GPU | 10 #if SK_SUPPORT_GPU |
| 11 | 11 |
| 12 #include "SkCanvas.h" | 12 #include "SkCanvas.h" |
| 13 #include "SkSurface.h" | 13 #include "SkSurface.h" |
| 14 #include "SkTextBlob.h" | 14 #include "SkTextBlob.h" |
| 15 #include "GrContext.h" |
| 15 | 16 |
| 16 // This tests that we correctly regenerate textblobs after freeing all gpu resou
rces crbug/491350 | 17 // This tests that we correctly regenerate textblobs after freeing all gpu resou
rces crbug/491350 |
| 17 namespace skiagm { | 18 namespace skiagm { |
| 18 class TextBlobUseAfterGpuFree : public GM { | 19 class TextBlobUseAfterGpuFree : public GM { |
| 19 public: | 20 public: |
| 20 TextBlobUseAfterGpuFree() { } | 21 TextBlobUseAfterGpuFree() { } |
| 21 | 22 |
| 22 protected: | 23 protected: |
| 23 SkString onShortName() override { | 24 SkString onShortName() override { |
| 24 return SkString("textblobuseaftergpufree"); | 25 return SkString("textblobuseaftergpufree"); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 static const int kHeight = 200; | 65 static const int kHeight = 200; |
| 65 | 66 |
| 66 typedef GM INHERITED; | 67 typedef GM INHERITED; |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 ////////////////////////////////////////////////////////////////////////////// | 70 ////////////////////////////////////////////////////////////////////////////// |
| 70 | 71 |
| 71 DEF_GM( return SkNEW(TextBlobUseAfterGpuFree); ) | 72 DEF_GM( return SkNEW(TextBlobUseAfterGpuFree); ) |
| 72 } | 73 } |
| 73 #endif | 74 #endif |
| OLD | NEW |