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

Unified Diff: src/core/SkDeviceImageFilterProxy.h

Issue 1172693002: remove subclassing from ImageFilter::Proxy (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: src/core/SkDeviceImageFilterProxy.h
diff --git a/src/core/SkDeviceImageFilterProxy.h b/src/core/SkDeviceImageFilterProxy.h
deleted file mode 100644
index 5d0a61eddf9ae11a3e4f8ba7b72ac149336f635b..0000000000000000000000000000000000000000
--- a/src/core/SkDeviceImageFilterProxy.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2012 The Android Open Source Project
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkDeviceImageFilterProxy_DEFINED
-#define SkDeviceImageFilterProxy_DEFINED
-
-#include "SkBitmapDevice.h"
-#include "SkDevice.h"
-#include "SkImageFilter.h"
-#include "SkSurfaceProps.h"
-
-class SkDeviceImageFilterProxy : public SkImageFilter::Proxy {
-public:
- SkDeviceImageFilterProxy(SkBaseDevice* device, const SkSurfaceProps& props)
- : fDevice(device)
- , fProps(props.flags(), kUnknown_SkPixelGeometry)
- {}
-
- SkBaseDevice* createDevice(int w, int h) override {
- SkBaseDevice::CreateInfo cinfo(SkImageInfo::MakeN32Premul(w, h),
- SkBaseDevice::kNever_TileUsage,
- kUnknown_SkPixelGeometry,
- true /*forImageFilter*/);
- SkBaseDevice* dev = fDevice->onCreateDevice(cinfo, NULL);
- if (NULL == dev) {
- dev = SkBitmapDevice::Create(cinfo.fInfo);
- }
- return dev;
- }
- bool filterImage(const SkImageFilter* filter, const SkBitmap& src,
- const SkImageFilter::Context& ctx, SkBitmap* res, SkIPoint* offset) override {
- return fDevice->filterImage(filter, src, ctx, res, offset);
- }
- const SkSurfaceProps* surfaceProps() const override {
- return &fProps;
- }
-
-private:
- SkBaseDevice* fDevice;
- const SkSurfaceProps fProps;
-};
-
-#endif
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkImageFilter.cpp » ('j') | src/core/SkImageFilter.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698