Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Side by Side Diff: gm/resizeimagefilter.cpp

Issue 380373003: Fix for saveLayer() with filters vs. the BBox Hierarchy. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Use SkTDArray::deleteAll() Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/core/SkBBoxRecord.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "SkBitmapDevice.h" 9 #include "SkBitmapDevice.h"
10 #include "SkBitmapSource.h" 10 #include "SkBitmapSource.h"
11 #include "SkColor.h" 11 #include "SkColor.h"
12 #include "SkMatrixImageFilter.h" 12 #include "SkMatrixImageFilter.h"
13 #include "SkRefCnt.h" 13 #include "SkRefCnt.h"
14 14
15 namespace skiagm { 15 namespace skiagm {
16 16
17 class ResizeGM : public GM { 17 class ResizeGM : public GM {
18 public: 18 public:
19 ResizeGM() { 19 ResizeGM() {
20 this->setBGColor(0x00000000); 20 this->setBGColor(0x00000000);
21 } 21 }
22 22
23 protected: 23 protected:
24 virtual uint32_t onGetFlags() const SK_OVERRIDE { return kNoBBH_Flag; }
25
26 virtual SkString onShortName() { 24 virtual SkString onShortName() {
27 return SkString("resizeimagefilter"); 25 return SkString("resizeimagefilter");
28 } 26 }
29 27
30 void draw(SkCanvas* canvas, 28 void draw(SkCanvas* canvas,
31 const SkRect& rect, 29 const SkRect& rect,
32 const SkSize& deviceSize, 30 const SkSize& deviceSize,
33 SkPaint::FilterLevel filterLevel, 31 SkPaint::FilterLevel filterLevel,
34 SkImageFilter* input = NULL) { 32 SkImageFilter* input = NULL) {
35 SkRect dstRect; 33 SkRect dstRect;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 private: 114 private:
117 typedef GM INHERITED; 115 typedef GM INHERITED;
118 }; 116 };
119 117
120 ////////////////////////////////////////////////////////////////////////////// 118 //////////////////////////////////////////////////////////////////////////////
121 119
122 static GM* MyFactory(void*) { return new ResizeGM; } 120 static GM* MyFactory(void*) { return new ResizeGM; }
123 static GMRegistry reg(MyFactory); 121 static GMRegistry reg(MyFactory);
124 122
125 } 123 }
OLDNEW
« no previous file with comments | « no previous file | src/core/SkBBoxRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698