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 "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
9 #include "SkBlurImageFilter.h" | 9 #include "SkBlurImageFilter.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 } | 778 } |
779 } | 779 } |
780 picture.reset(recorder.endRecording()); | 780 picture.reset(recorder.endRecording()); |
781 // hairline stroked AA concave paths are fine for GPU rendering | 781 // hairline stroked AA concave paths are fine for GPU rendering |
782 REPORTER_ASSERT(reporter, picture->suitableForGpuRasterization(NULL)); | 782 REPORTER_ASSERT(reporter, picture->suitableForGpuRasterization(NULL)); |
783 } | 783 } |
784 | 784 |
785 static void test_gpu_picture_optimization(skiatest::Reporter* reporter, | 785 static void test_gpu_picture_optimization(skiatest::Reporter* reporter, |
786 GrContextFactory* factory) { | 786 GrContextFactory* factory) { |
787 | 787 |
788 GrContext* context = factory->get(GrContextFactory::kNative_GLContextType); | 788 GrContext* context = factory->get(GrContextFactory::kNative_GLContextType, k
None_GrGLStandard); |
789 | 789 |
790 static const int kWidth = 100; | 790 static const int kWidth = 100; |
791 static const int kHeight = 100; | 791 static const int kHeight = 100; |
792 | 792 |
793 SkAutoTUnref<SkPicture> pict; | 793 SkAutoTUnref<SkPicture> pict; |
794 | 794 |
795 // create a picture with the structure: | 795 // create a picture with the structure: |
796 // 1) | 796 // 1) |
797 // SaveLayer | 797 // SaveLayer |
798 // Restore | 798 // Restore |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1586 SkAutoTUnref<SkPicture> picture(recorder.endRecording()); | 1586 SkAutoTUnref<SkPicture> picture(recorder.endRecording()); |
1587 } | 1587 } |
1588 | 1588 |
1589 DEF_TEST(Canvas_EmptyBitmap, r) { | 1589 DEF_TEST(Canvas_EmptyBitmap, r) { |
1590 SkBitmap dst; | 1590 SkBitmap dst; |
1591 dst.allocN32Pixels(10, 10); | 1591 dst.allocN32Pixels(10, 10); |
1592 SkCanvas canvas(dst); | 1592 SkCanvas canvas(dst); |
1593 | 1593 |
1594 test_draw_bitmaps(&canvas); | 1594 test_draw_bitmaps(&canvas); |
1595 } | 1595 } |
OLD | NEW |