Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(500)

Side by Side Diff: tools/PictureRenderer.cpp

Issue 551463004: introduce Props to surface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add new file Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/SurfaceTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « tests/SurfaceTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698