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 "PictureRenderer.h" | 8 #include "PictureRenderer.h" |
9 #include "picture_utils.h" | 9 #include "picture_utils.h" |
10 #include "SamplePipeControllers.h" | 10 #include "SamplePipeControllers.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 break; | 145 break; |
146 #if SK_SUPPORT_GPU | 146 #if SK_SUPPORT_GPU |
147 #if SK_ANGLE | 147 #if SK_ANGLE |
148 case kAngle_DeviceType: | 148 case kAngle_DeviceType: |
149 // fall through | 149 // fall through |
150 #endif | 150 #endif |
151 #if SK_MESA | 151 #if SK_MESA |
152 case kMesa_DeviceType: | 152 case kMesa_DeviceType: |
153 // fall through | 153 // fall through |
154 #endif | 154 #endif |
155 case kGPU_DeviceType: { | 155 case kGPU_DeviceType: |
| 156 case kNVPR_DeviceType: { |
156 SkAutoTUnref<GrSurface> target; | 157 SkAutoTUnref<GrSurface> target; |
157 if (fGrContext) { | 158 if (fGrContext) { |
158 // create a render target to back the device | 159 // create a render target to back the device |
159 GrTextureDesc desc; | 160 GrTextureDesc desc; |
160 desc.fConfig = kSkia8888_GrPixelConfig; | 161 desc.fConfig = kSkia8888_GrPixelConfig; |
161 desc.fFlags = kRenderTarget_GrTextureFlagBit; | 162 desc.fFlags = kRenderTarget_GrTextureFlagBit; |
162 desc.fWidth = width; | 163 desc.fWidth = width; |
163 desc.fHeight = height; | 164 desc.fHeight = height; |
164 desc.fSampleCnt = fSampleCount; | 165 desc.fSampleCnt = fSampleCount; |
165 target.reset(fGrContext->createUncachedTexture(desc, NULL, 0)); | 166 target.reset(fGrContext->createUncachedTexture(desc, NULL, 0)); |
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 virtual SkString getConfigNameInternal() SK_OVERRIDE { | 953 virtual SkString getConfigNameInternal() SK_OVERRIDE { |
953 return SkString("picture_clone"); | 954 return SkString("picture_clone"); |
954 } | 955 } |
955 }; | 956 }; |
956 | 957 |
957 PictureRenderer* CreatePictureCloneRenderer() { | 958 PictureRenderer* CreatePictureCloneRenderer() { |
958 return SkNEW(PictureCloneRenderer); | 959 return SkNEW(PictureCloneRenderer); |
959 } | 960 } |
960 | 961 |
961 } // namespace sk_tools | 962 } // namespace sk_tools |
OLD | NEW |