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))); | |
162 canvas = SkNEW_ARGS(SkCanvas, (device.get())); | 161 canvas = SkNEW_ARGS(SkCanvas, (device.get())); |
163 break; | 162 break; |
164 } | 163 } |
165 #endif | 164 #endif |
166 default: | 165 default: |
167 SkASSERT(0); | 166 SkASSERT(0); |
168 return NULL; | 167 return NULL; |
169 } | 168 } |
170 setUpFilter(canvas, fDrawFilters); | 169 setUpFilter(canvas, fDrawFilters); |
171 this->scaleToScaleFactor(canvas); | 170 this->scaleToScaleFactor(canvas); |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 PictureRenderer* CreateGatherPixelRefsRenderer(const GrContext::Options& opts) { | 780 PictureRenderer* CreateGatherPixelRefsRenderer(const GrContext::Options& opts) { |
782 return SkNEW_ARGS(GatherRenderer, (opts)); | 781 return SkNEW_ARGS(GatherRenderer, (opts)); |
783 } | 782 } |
784 #else | 783 #else |
785 PictureRenderer* CreateGatherPixelRefsRenderer() { | 784 PictureRenderer* CreateGatherPixelRefsRenderer() { |
786 return SkNEW(GatherRenderer); | 785 return SkNEW(GatherRenderer); |
787 } | 786 } |
788 #endif | 787 #endif |
789 | 788 |
790 } // namespace sk_tools | 789 } // namespace sk_tools |
OLD | NEW |