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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1180 case SkPaint::kNone_FilterLevel: | 1180 case SkPaint::kNone_FilterLevel: |
1181 textureFilterMode = GrTextureParams::kNone_FilterMode; | 1181 textureFilterMode = GrTextureParams::kNone_FilterMode; |
1182 break; | 1182 break; |
1183 case SkPaint::kLow_FilterLevel: | 1183 case SkPaint::kLow_FilterLevel: |
1184 textureFilterMode = GrTextureParams::kBilerp_FilterMode; | 1184 textureFilterMode = GrTextureParams::kBilerp_FilterMode; |
1185 break; | 1185 break; |
1186 case SkPaint::kMedium_FilterLevel: | 1186 case SkPaint::kMedium_FilterLevel: |
1187 textureFilterMode = GrTextureParams::kMipMap_FilterMode; | 1187 textureFilterMode = GrTextureParams::kMipMap_FilterMode; |
1188 break; | 1188 break; |
1189 case SkPaint::kHigh_FilterLevel: | 1189 case SkPaint::kHigh_FilterLevel: |
1190 /* | |
epoger
2013/09/04 14:36:40
Why is this file part of this CL?
| |
1190 SkErrorInternals::SetError( kInvalidPaint_SkError, | 1191 SkErrorInternals::SetError( kInvalidPaint_SkError, |
1191 "Sorry, I don't yet support high quality " | 1192 "Sorry, I don't yet support high quality " |
1192 "filtering on the GPU. Falling back to " | 1193 "filtering on the GPU. Falling back to " |
1193 "MIPMaps."); | 1194 "MIPMaps."); |
1195 */ | |
1194 textureFilterMode = GrTextureParams::kMipMap_FilterMode; | 1196 textureFilterMode = GrTextureParams::kMipMap_FilterMode; |
1195 break; | 1197 break; |
1196 default: | 1198 default: |
1197 SkErrorInternals::SetError( kInvalidPaint_SkError, | 1199 SkErrorInternals::SetError( kInvalidPaint_SkError, |
1198 "Sorry, I don't understand the filtering " | 1200 "Sorry, I don't understand the filtering " |
1199 "mode you asked for. Falling back to " | 1201 "mode you asked for. Falling back to " |
1200 "MIPMaps."); | 1202 "MIPMaps."); |
1201 textureFilterMode = GrTextureParams::kMipMap_FilterMode; | 1203 textureFilterMode = GrTextureParams::kMipMap_FilterMode; |
1202 break; | 1204 break; |
1203 | 1205 |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1859 GrTexture* texture, | 1861 GrTexture* texture, |
1860 bool needClear) | 1862 bool needClear) |
1861 : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) { | 1863 : SkBitmapDevice(make_bitmap(context, texture->asRenderTarget())) { |
1862 | 1864 |
1863 SkASSERT(texture && texture->asRenderTarget()); | 1865 SkASSERT(texture && texture->asRenderTarget()); |
1864 // This constructor is called from onCreateCompatibleDevice. It has locked t he RT in the texture | 1866 // This constructor is called from onCreateCompatibleDevice. It has locked t he RT in the texture |
1865 // cache. We pass true for the third argument so that it will get unlocked. | 1867 // cache. We pass true for the third argument so that it will get unlocked. |
1866 this->initFromRenderTarget(context, texture->asRenderTarget(), true); | 1868 this->initFromRenderTarget(context, texture->asRenderTarget(), true); |
1867 fNeedClear = needClear; | 1869 fNeedClear = needClear; |
1868 } | 1870 } |
OLD | NEW |