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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 desc.fWidth = width; | 150 desc.fWidth = width; |
151 desc.fHeight = height; | 151 desc.fHeight = height; |
152 desc.fSampleCnt = fSampleCount; | 152 desc.fSampleCnt = fSampleCount; |
153 target.reset(fGrContext->createUncachedTexture(desc, NULL, 0)); | 153 target.reset(fGrContext->createUncachedTexture(desc, NULL, 0)); |
154 } | 154 } |
155 if (NULL == target.get()) { | 155 if (NULL == target.get()) { |
156 SkASSERT(0); | 156 SkASSERT(0); |
157 return NULL; | 157 return NULL; |
158 } | 158 } |
159 | 159 |
160 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(target)); | 160 SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(target, |
| 161 SkSurfaceProps(SkSurfaceProps::kLegacyF
ontHost_InitType))); |
161 canvas = SkNEW_ARGS(SkCanvas, (device.get())); | 162 canvas = SkNEW_ARGS(SkCanvas, (device.get())); |
162 break; | 163 break; |
163 } | 164 } |
164 #endif | 165 #endif |
165 default: | 166 default: |
166 SkASSERT(0); | 167 SkASSERT(0); |
167 return NULL; | 168 return NULL; |
168 } | 169 } |
169 setUpFilter(canvas, fDrawFilters); | 170 setUpFilter(canvas, fDrawFilters); |
170 this->scaleToScaleFactor(canvas); | 171 this->scaleToScaleFactor(canvas); |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
780 PictureRenderer* CreateGatherPixelRefsRenderer(const GrContext::Options& opts) { | 781 PictureRenderer* CreateGatherPixelRefsRenderer(const GrContext::Options& opts) { |
781 return SkNEW_ARGS(GatherRenderer, (opts)); | 782 return SkNEW_ARGS(GatherRenderer, (opts)); |
782 } | 783 } |
783 #else | 784 #else |
784 PictureRenderer* CreateGatherPixelRefsRenderer() { | 785 PictureRenderer* CreateGatherPixelRefsRenderer() { |
785 return SkNEW(GatherRenderer); | 786 return SkNEW(GatherRenderer); |
786 } | 787 } |
787 #endif | 788 #endif |
788 | 789 |
789 } // namespace sk_tools | 790 } // namespace sk_tools |
OLD | NEW |