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

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

Issue 106933002: Implement srcRect and dstRect functionality in SkBitmapSource. This is required for the "preserveAs… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix nits Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « gyp/gmslides.gypi ('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
1 /* 1 /*
2 * Copyright 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 #ifndef SkBitmapSource_DEFINED 8 #ifndef SkBitmapSource_DEFINED
9 #define SkBitmapSource_DEFINED 9 #define SkBitmapSource_DEFINED
10 10
11 #include "SkImageFilter.h" 11 #include "SkImageFilter.h"
12 #include "SkBitmap.h" 12 #include "SkBitmap.h"
13 13
14 class SK_API SkBitmapSource : public SkImageFilter { 14 class SK_API SkBitmapSource : public SkImageFilter {
15 public: 15 public:
16 explicit SkBitmapSource(const SkBitmap& bitmap); 16 explicit SkBitmapSource(const SkBitmap& bitmap);
17 SkBitmapSource(const SkBitmap& bitmap, const SkRect& srcRect, const SkRect& dstRect);
17 18
18 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapSource) 19 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapSource)
19 20
20 protected: 21 protected:
21 explicit SkBitmapSource(SkFlattenableReadBuffer& buffer); 22 explicit SkBitmapSource(SkFlattenableReadBuffer& buffer);
22 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE; 23 virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
23 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&, 24 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const SkMatrix&,
24 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE; 25 SkBitmap* result, SkIPoint* offset) SK_OVERRIDE;
25 26
26 private: 27 private:
27 SkBitmap fBitmap; 28 SkBitmap fBitmap;
29 SkRect fSrcRect, fDstRect;
28 typedef SkImageFilter INHERITED; 30 typedef SkImageFilter INHERITED;
29 }; 31 };
30 32
31 #endif 33 #endif
OLDNEW
« no previous file with comments | « gyp/gmslides.gypi ('k') | src/effects/SkBitmapSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698