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

Side by Side Diff: include/effects/SkBitmapSource.h

Issue 1363913002: Remove SkBitmapSource (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: immutable bitmap Created 5 years, 2 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 | « include/core/SkPicture.h ('k') | src/effects/SkBitmapSource.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2012 The Android Open Source Project
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef SkBitmapSource_DEFINED
9 #define SkBitmapSource_DEFINED
10
11 #include "SkImageFilter.h"
12 #include "SkBitmap.h"
13
14 class SK_API SkBitmapSource : public SkImageFilter {
15 public:
16 static SkBitmapSource* Create(const SkBitmap& bitmap) { return new SkBitmapS ource(bitmap); }
17 static SkBitmapSource* Create(const SkBitmap& bitmap,
18 const SkRect& srcRect, const SkRect& dstRect,
19 SkFilterQuality filterQuality = kHigh_SkFilter Quality) {
20 return new SkBitmapSource(bitmap, srcRect, dstRect, filterQuality);
21 }
22 void computeFastBounds(const SkRect& src, SkRect* dst) const override;
23
24 SK_TO_STRING_OVERRIDE()
25 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapSource)
26
27 protected:
28 explicit SkBitmapSource(const SkBitmap& bitmap);
29 SkBitmapSource(const SkBitmap& bitmap,
30 const SkRect& srcRect, const SkRect& dstRect,
31 SkFilterQuality filterQuality);
32 void flatten(SkWriteBuffer&) const override;
33
34 bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
35 SkBitmap* result, SkIPoint* offset) const override;
36
37 private:
38 SkBitmap fBitmap;
39 SkRect fSrcRect, fDstRect;
40 SkFilterQuality fFilterQuality;
41
42 typedef SkImageFilter INHERITED;
43 };
44
45 #endif
OLDNEW
« no previous file with comments | « include/core/SkPicture.h ('k') | src/effects/SkBitmapSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698