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

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

Issue 1153123003: refactor bitmapshader to use a controller (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 unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
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 SkBitmapController_DEFINED
9 #define SkBitmapController_DEFINED
10
11 #include "SkFilterQuality.h"
12
13 class SkBitmap;
14 class SkMatrix;
15
16 /**
17 * Handles request to scale, filter, and lock a bitmap to be rasterized.
18 */
19 class SkBitmapController {
20 public:
21 bool requestBitmap(const SkBitmap& inBM, const SkMatrix& inverse, SkFilterQu ality inQuality,
22 SkBitmap* outBM, SkMatrix* outInv, SkFilterQuality* outQu ality);
scroggo 2015/06/02 13:24:54 Maybe add a comment - it looks like all of these m
reed1 2015/06/02 14:07:46 New version is simpler/clearer.
23
24 protected:
25 virtual bool onRequestBitmap(const SkBitmap& inBM, const SkMatrix& inverse, SkFilterQuality inQ,
26 SkBitmap* outBM, SkMatrix* outInv, SkFilterQual ity* outQ) = 0;
27 };
28
29 //////////////////////////////////////////////////////////////////////////////// ///////////////////
30
31 class SkDefaultBitmapController : public SkBitmapController {
32 public:
33 SkDefaultBitmapController() {}
34
35 protected:
36 bool onRequestBitmap(const SkBitmap&, const SkMatrix&, SkFilterQuality,
37 SkBitmap*, SkMatrix*, SkFilterQuality*) override;
38 };
39
40 #endif
OLDNEW
« no previous file with comments | « gyp/core.gypi ('k') | src/core/SkBitmapController.cpp » ('j') | src/core/SkBitmapController.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698