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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 , fSaveLayerCount(0) | 930 , fSaveLayerCount(0) |
931 , fRestoreCount(0){ | 931 , fRestoreCount(0){ |
932 } | 932 } |
933 | 933 |
934 virtual SaveLayerStrategy willSaveLayer(const SkRect* bounds, const SkPaint*
paint, | 934 virtual SaveLayerStrategy willSaveLayer(const SkRect* bounds, const SkPaint*
paint, |
935 SaveFlags flags) SK_OVERRIDE { | 935 SaveFlags flags) SK_OVERRIDE { |
936 ++fSaveLayerCount; | 936 ++fSaveLayerCount; |
937 return this->INHERITED::willSaveLayer(bounds, paint, flags); | 937 return this->INHERITED::willSaveLayer(bounds, paint, flags); |
938 } | 938 } |
939 | 939 |
940 virtual void willSave(SaveFlags flags) SK_OVERRIDE { | 940 virtual void willSave() SK_OVERRIDE { |
941 ++fSaveCount; | 941 ++fSaveCount; |
942 this->INHERITED::willSave(flags); | 942 this->INHERITED::willSave(); |
943 } | 943 } |
944 | 944 |
945 virtual void willRestore() SK_OVERRIDE { | 945 virtual void willRestore() SK_OVERRIDE { |
946 ++fRestoreCount; | 946 ++fRestoreCount; |
947 this->INHERITED::willRestore(); | 947 this->INHERITED::willRestore(); |
948 } | 948 } |
949 | 949 |
950 unsigned int getSaveCount() const { return fSaveCount; } | 950 unsigned int getSaveCount() const { return fSaveCount; } |
951 unsigned int getSaveLayerCount() const { return fSaveLayerCount; } | 951 unsigned int getSaveLayerCount() const { return fSaveLayerCount; } |
952 unsigned int getRestoreCount() const { return fRestoreCount; } | 952 unsigned int getRestoreCount() const { return fRestoreCount; } |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1636 SkAutoTUnref<SkPicture> picture(recorder.endRecording()); | 1636 SkAutoTUnref<SkPicture> picture(recorder.endRecording()); |
1637 } | 1637 } |
1638 | 1638 |
1639 DEF_TEST(Canvas_EmptyBitmap, r) { | 1639 DEF_TEST(Canvas_EmptyBitmap, r) { |
1640 SkBitmap dst; | 1640 SkBitmap dst; |
1641 dst.allocN32Pixels(10, 10); | 1641 dst.allocN32Pixels(10, 10); |
1642 SkCanvas canvas(dst); | 1642 SkCanvas canvas(dst); |
1643 | 1643 |
1644 test_draw_bitmaps(&canvas); | 1644 test_draw_bitmaps(&canvas); |
1645 } | 1645 } |
OLD | NEW |