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

Side by Side Diff: src/core/SkBitmapController.h

Issue 1158273007: switch bitmapshader internals over to pixmap (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix neon/mips to use pixmpas 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 unified diff | Download patch
« no previous file with comments | « include/core/SkPixmap.h ('k') | src/core/SkBitmapController.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 2015 Google Inc. 2 * Copyright 2015 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 #ifndef SkBitmapController_DEFINED 8 #ifndef SkBitmapController_DEFINED
9 #define SkBitmapController_DEFINED 9 #define SkBitmapController_DEFINED
10 10
11 #include "SkBitmap.h" 11 #include "SkBitmap.h"
12 #include "SkFilterQuality.h" 12 #include "SkFilterQuality.h"
13 #include "SkMatrix.h" 13 #include "SkMatrix.h"
14 14
15 /** 15 /**
16 * Handles request to scale, filter, and lock a bitmap to be rasterized. 16 * Handles request to scale, filter, and lock a bitmap to be rasterized.
17 */ 17 */
18 class SkBitmapController : ::SkNoncopyable { 18 class SkBitmapController : ::SkNoncopyable {
19 public: 19 public:
20 class State : ::SkNoncopyable { 20 class State : ::SkNoncopyable {
21 public: 21 public:
22 virtual ~State() {} 22 virtual ~State() {}
23 23
24 const SkBitmap& lockedBitmap() const { return fLockedBitmap; } 24 const SkPixmap& pixmap() const { return fPixmap; }
25 const SkMatrix& invMatrix() const { return fInvMatrix; } 25 const SkMatrix& invMatrix() const { return fInvMatrix; }
26 SkFilterQuality quality() const { return fQuality; } 26 SkFilterQuality quality() const { return fQuality; }
27 27
28 protected: 28 protected:
29 SkBitmap fLockedBitmap; 29 SkPixmap fPixmap;
30 SkMatrix fInvMatrix; 30 SkMatrix fInvMatrix;
31 SkFilterQuality fQuality; 31 SkFilterQuality fQuality;
32 32
33 private: 33 private:
34 friend class SkBitmapController; 34 friend class SkBitmapController;
35 }; 35 };
36 36
37 virtual ~SkBitmapController() {} 37 virtual ~SkBitmapController() {}
38 38
39 State* requestBitmap(const SkBitmap&, const SkMatrix& inverse, SkFilterQuali ty, 39 State* requestBitmap(const SkBitmap&, const SkMatrix& inverse, SkFilterQuali ty,
(...skipping 13 matching lines...) Expand all
53 class SkDefaultBitmapController : public SkBitmapController { 53 class SkDefaultBitmapController : public SkBitmapController {
54 public: 54 public:
55 SkDefaultBitmapController() {} 55 SkDefaultBitmapController() {}
56 56
57 protected: 57 protected:
58 State* onRequestBitmap(const SkBitmap&, const SkMatrix& inverse, SkFilterQua lity, 58 State* onRequestBitmap(const SkBitmap&, const SkMatrix& inverse, SkFilterQua lity,
59 void* storage, size_t storageSize) override; 59 void* storage, size_t storageSize) override;
60 }; 60 };
61 61
62 #endif 62 #endif
OLDNEW
« no previous file with comments | « include/core/SkPixmap.h ('k') | src/core/SkBitmapController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698