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/image/SkImage_BitmapBase.h

Issue 577063004: Refactoring in SkImage implementations backed by a SkBitmap (Closed) Base URL: https://skia.googlesource.com/skia.git@small_refactor_skimageCodec
Patch Set: Get rid of SkImage_Codec Created 6 years, 3 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 2014 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 SkImage_BitmapBase_DEFINED
9 #define SkImage_BitmapBase_DEFINED
10
11 #include "SkImage_Base.h"
12
13 class SkBitmap;
14
15 class SkImage_BitmapBase : public SkImage_Base {
16 public:
17 SkImage_BitmapBase(int width, int height);
18 SkImage_BitmapBase(const SkBitmap&);
19 virtual ~SkImage_BitmapBase();
20
21 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const SK_OVERRIDE;
22 virtual void onDrawRectToRect(SkCanvas*, const SkRect* src, const SkRect& ds t,
23 const SkPaint*) const SK_OVERRIDE;
24
25 virtual SkShader* onNewShader(SkShader::TileMode,
26 SkShader::TileMode,
27 const SkMatrix* localMatrix) const SK_OVERRIDE ;
28
29 virtual bool isOpaque() const SK_OVERRIDE;
30
31 protected:
32 virtual const SkBitmap& getBitmap() const;
33
34 private:
35 SkBitmap fBitmap;
36
37 typedef SkImage_Base INHERITED;
38 };
39
40 #endif /* SkImage_BitmapBase_DEFINED */
41
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698