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 "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkBitmapCache.h" | 9 #include "SkBitmapCache.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 | 109 |
110 static SkIRect compute_fast_ibounds(SkImageFilter* filter, const SkIRect& srcBou nds) { | 110 static SkIRect compute_fast_ibounds(SkImageFilter* filter, const SkIRect& srcBou nds) { |
111 SkRect fastBounds; | 111 SkRect fastBounds; |
112 fastBounds.set(srcBounds); | 112 fastBounds.set(srcBounds); |
113 filter->computeFastBounds(fastBounds, &fastBounds); | 113 filter->computeFastBounds(fastBounds, &fastBounds); |
114 return fastBounds.roundOut(); | 114 return fastBounds.roundOut(); |
115 } | 115 } |
116 | 116 |
117 class SkRasterImageFilterProxy : public SkImageFilter::Proxy { | 117 class SkRasterImageFilterProxy : public SkImageFilter::Proxy { |
118 public: | 118 public: |
119 SkBaseDevice* createDevice(int width, int height) override { | 119 SkBaseDevice* createDevice(int width, int height, bool tile = false) overrid e { |
reed1
2016/01/10 02:25:02
I think default args on overrides are very tricky,
| |
120 return SkBitmapDevice::Create(SkImageInfo::MakeN32Premul(width, height)) ; | 120 return SkBitmapDevice::Create(SkImageInfo::MakeN32Premul(width, height)) ; |
121 } | 121 } |
122 | 122 |
123 bool filterImage(const SkImageFilter*, const SkBitmap&, const SkImageFilter: :Context&, | 123 bool filterImage(const SkImageFilter*, const SkBitmap&, const SkImageFilter: :Context&, |
124 SkBitmap*, SkIPoint*) override { | 124 SkBitmap*, SkIPoint*) override { |
125 return false; | 125 return false; |
126 } | 126 } |
127 }; | 127 }; |
128 | 128 |
129 SkImage* SkImage_Base::onApplyFilter(SkImageFilter* filter, SkIPoint* offsetResu lt, | 129 SkImage* SkImage_Base::onApplyFilter(SkImageFilter* filter, SkIPoint* offsetResu lt, |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
407 | 407 |
408 SkImage* SkImage::NewFromAdoptedTexture(GrContext*, const GrBackendTextureDesc&, SkAlphaType) { | 408 SkImage* SkImage::NewFromAdoptedTexture(GrContext*, const GrBackendTextureDesc&, SkAlphaType) { |
409 return nullptr; | 409 return nullptr; |
410 } | 410 } |
411 | 411 |
412 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk AlphaType) { | 412 SkImage* SkImage::NewFromTextureCopy(GrContext*, const GrBackendTextureDesc&, Sk AlphaType) { |
413 return nullptr; | 413 return nullptr; |
414 } | 414 } |
415 | 415 |
416 #endif | 416 #endif |
OLD | NEW |