| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #include "SkImage_Base.h" | 8 #include "SkImage_Base.h" |
| 9 #include "SkImagePriv.h" | 9 #include "SkImagePriv.h" |
| 10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| 11 #include "SkCanvas.h" | 11 #include "SkCanvas.h" |
| 12 #include "GrContext.h" | 12 #include "GrContext.h" |
| 13 #include "GrTexture.h" | 13 #include "GrTexture.h" |
| 14 #include "SkGrPixelRef.h" | |
| 15 | 14 |
| 16 class SkImage_Gpu : public SkImage_Base { | 15 class SkImage_Gpu : public SkImage_Base { |
| 17 public: | 16 public: |
| 18 SK_DECLARE_INST_COUNT(SkImage_Gpu) | 17 SK_DECLARE_INST_COUNT(SkImage_Gpu) |
| 19 | 18 |
| 20 explicit SkImage_Gpu(const SkBitmap&); | 19 explicit SkImage_Gpu(const SkBitmap&); |
| 21 virtual ~SkImage_Gpu(); | 20 virtual ~SkImage_Gpu(); |
| 22 | 21 |
| 23 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const
SK_OVERRIDE; | 22 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, const SkPaint*) const
SK_OVERRIDE; |
| 24 virtual void onDrawRectToRect(SkCanvas*, const SkRect* src, const SkRect& ds
t, | 23 virtual void onDrawRectToRect(SkCanvas*, const SkRect* src, const SkRect& ds
t, |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 if (NULL == bitmap.getTexture()) { | 84 if (NULL == bitmap.getTexture()) { |
| 86 return NULL; | 85 return NULL; |
| 87 } | 86 } |
| 88 | 87 |
| 89 return SkNEW_ARGS(SkImage_Gpu, (bitmap)); | 88 return SkNEW_ARGS(SkImage_Gpu, (bitmap)); |
| 90 } | 89 } |
| 91 | 90 |
| 92 GrTexture* SkTextureImageGetTexture(SkImage* image) { | 91 GrTexture* SkTextureImageGetTexture(SkImage* image) { |
| 93 return ((SkImage_Gpu*)image)->getTexture(); | 92 return ((SkImage_Gpu*)image)->getTexture(); |
| 94 } | 93 } |
| OLD | NEW |