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

Side by Side Diff: src/image/SkImage.cpp

Issue 1570133003: Fix SkTileImageFilter when srcRect is a superset of bitmap bounds. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Win32 fix Created 4 years, 11 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698