| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2013 Google Inc. | 2  * Copyright 2013 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 "SkColorFilter.h" | 9 #include "SkColorFilter.h" | 
| 10 | 10 | 
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 108         paint.setStyle(SkPaint::kStroke_Style); | 108         paint.setStyle(SkPaint::kStroke_Style); | 
| 109         paint.setColor(SK_ColorRED); | 109         paint.setColor(SK_ColorRED); | 
| 110         canvas->drawRect(r, paint); | 110         canvas->drawRect(r, paint); | 
| 111     } | 111     } | 
| 112 | 112 | 
| 113     virtual uint32_t onGetFlags() const { | 113     virtual uint32_t onGetFlags() const { | 
| 114         // Because of the use of drawSprite, this test is excluded | 114         // Because of the use of drawSprite, this test is excluded | 
| 115         // from scaled replay tests because drawSprite ignores the | 115         // from scaled replay tests because drawSprite ignores the | 
| 116         // reciprocal scale that is applied at record time, which is | 116         // reciprocal scale that is applied at record time, which is | 
| 117         // the intended behavior of drawSprite. | 117         // the intended behavior of drawSprite. | 
| 118         return kSkipScaledReplay_Flag; | 118         return kSkipScaledReplay_Flag | kSkipTiled_Flag; | 
| 119     } | 119     } | 
| 120 | 120 | 
| 121     virtual void onDraw(SkCanvas* canvas) { | 121     virtual void onDraw(SkCanvas* canvas) { | 
| 122         void (*drawProc[])(SkCanvas*, const SkRect&, SkImageFilter*) = { | 122         void (*drawProc[])(SkCanvas*, const SkRect&, SkImageFilter*) = { | 
| 123             draw_sprite, draw_bitmap, draw_path, draw_paint, draw_text | 123             draw_sprite, draw_bitmap, draw_path, draw_paint, draw_text | 
| 124         }; | 124         }; | 
| 125 | 125 | 
| 126         SkAutoTUnref<SkColorFilter> cf( | 126         SkAutoTUnref<SkColorFilter> cf( | 
| 127             SkColorFilter::CreateModeFilter(SK_ColorMAGENTA, SkXfermode::kSrcIn_
     Mode)); | 127             SkColorFilter::CreateModeFilter(SK_ColorMAGENTA, SkXfermode::kSrcIn_
     Mode)); | 
| 128         SkAutoTUnref<SkImageFilter> cfif(SkColorFilterImageFilter::Create(cf.get
     ())); | 128         SkAutoTUnref<SkImageFilter> cfif(SkColorFilterImageFilter::Create(cf.get
     ())); | 
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 163     } | 163     } | 
| 164 | 164 | 
| 165 private: | 165 private: | 
| 166     typedef GM INHERITED; | 166     typedef GM INHERITED; | 
| 167 }; | 167 }; | 
| 168 | 168 | 
| 169 /////////////////////////////////////////////////////////////////////////////// | 169 /////////////////////////////////////////////////////////////////////////////// | 
| 170 | 170 | 
| 171 static skiagm::GM* MyFactory(void*) { return new DropShadowImageFilterGM; } | 171 static skiagm::GM* MyFactory(void*) { return new DropShadowImageFilterGM; } | 
| 172 static skiagm::GMRegistry reg(MyFactory); | 172 static skiagm::GMRegistry reg(MyFactory); | 
| OLD | NEW | 
|---|