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