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