OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkGpuDevice.h" | 8 #include "SkGpuDevice.h" |
9 | 9 |
10 #include "effects/GrTextureDomainEffect.h" | 10 #include "effects/GrTextureDomainEffect.h" |
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1076 return false; | 1076 return false; |
1077 } | 1077 } |
1078 } | 1078 } |
1079 | 1079 |
1080 void SkGpuDevice::drawBitmap(const SkDraw& draw, | 1080 void SkGpuDevice::drawBitmap(const SkDraw& draw, |
1081 const SkBitmap& bitmap, | 1081 const SkBitmap& bitmap, |
1082 const SkMatrix& m, | 1082 const SkMatrix& m, |
1083 const SkPaint& paint) { | 1083 const SkPaint& paint) { |
1084 // We cannot call drawBitmapRect here since 'm' could be anything | 1084 // We cannot call drawBitmapRect here since 'm' could be anything |
1085 this->drawBitmapCommon(draw, bitmap, NULL, m, paint, | 1085 this->drawBitmapCommon(draw, bitmap, NULL, m, paint, |
1086 SkCanvas::kNone_DrawBitmapRectflag); | 1086 SkCanvas::kNone_DrawBitmapRectFlag); |
1087 } | 1087 } |
1088 | 1088 |
1089 void SkGpuDevice::drawBitmapCommon(const SkDraw& draw, | 1089 void SkGpuDevice::drawBitmapCommon(const SkDraw& draw, |
1090 const SkBitmap& bitmap, | 1090 const SkBitmap& bitmap, |
1091 const SkRect* srcRectPtr, | 1091 const SkRect* srcRectPtr, |
1092 const SkMatrix& m, | 1092 const SkMatrix& m, |
1093 const SkPaint& paint, | 1093 const SkPaint& paint, |
1094 SkCanvas::DrawBitmapRectFlags flags) { | 1094 SkCanvas::DrawBitmapRectFlags flags) { |
1095 CHECK_SHOULD_DRAW(draw, false); | 1095 CHECK_SHOULD_DRAW(draw, false); |
1096 | 1096 |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1797 GrTexture* texture, | 1797 GrTexture* texture, |
1798 bool needClear) | 1798 bool needClear) |
1799 : SkDevice(make_bitmap(context, texture->asRenderTarget())) { | 1799 : SkDevice(make_bitmap(context, texture->asRenderTarget())) { |
1800 | 1800 |
1801 SkASSERT(texture && texture->asRenderTarget()); | 1801 SkASSERT(texture && texture->asRenderTarget()); |
1802 // This constructor is called from onCreateCompatibleDevice. It has locked t
he RT in the texture | 1802 // This constructor is called from onCreateCompatibleDevice. It has locked t
he RT in the texture |
1803 // cache. We pass true for the third argument so that it will get unlocked. | 1803 // cache. We pass true for the third argument so that it will get unlocked. |
1804 this->initFromRenderTarget(context, texture->asRenderTarget(), true); | 1804 this->initFromRenderTarget(context, texture->asRenderTarget(), true); |
1805 fNeedClear = needClear; | 1805 fNeedClear = needClear; |
1806 } | 1806 } |
OLD | NEW |