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

Side by Side Diff: tools/PictureRenderer.cpp

Issue 1322433006: Rename flag from "distance field" to "device independent." (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add legacy alias for chrome Created 5 years, 3 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 | « src/gpu/GrDrawContext.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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // create a render target to back the device 154 // create a render target to back the device
155 GrSurfaceDesc desc; 155 GrSurfaceDesc desc;
156 desc.fConfig = kSkia8888_GrPixelConfig; 156 desc.fConfig = kSkia8888_GrPixelConfig;
157 desc.fFlags = kRenderTarget_GrSurfaceFlag; 157 desc.fFlags = kRenderTarget_GrSurfaceFlag;
158 desc.fWidth = width; 158 desc.fWidth = width;
159 desc.fHeight = height; 159 desc.fHeight = height;
160 desc.fSampleCnt = fSampleCount; 160 desc.fSampleCnt = fSampleCount;
161 target.reset(fGrContext->textureProvider()->createTexture(desc, false, nullptr, 0)); 161 target.reset(fGrContext->textureProvider()->createTexture(desc, false, nullptr, 0));
162 } 162 }
163 163
164 uint32_t flags = fUseDFText ? SkSurfaceProps::kUseDistanceFieldFonts _Flag : 0; 164 uint32_t flags = fUseDFText ? SkSurfaceProps::kUseDeviceIndependentF onts_Flag : 0;
165 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType ); 165 SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType );
166 SkAutoTUnref<SkGpuDevice> device( 166 SkAutoTUnref<SkGpuDevice> device(
167 SkGpuDevice::Create(target->asRenderTarget(), &props, 167 SkGpuDevice::Create(target->asRenderTarget(), &props,
168 SkGpuDevice::kUninit_InitContents)); 168 SkGpuDevice::kUninit_InitContents));
169 if (!device) { 169 if (!device) {
170 return nullptr; 170 return nullptr;
171 } 171 }
172 canvas.reset(new SkCanvas(device)); 172 canvas.reset(new SkCanvas(device));
173 break; 173 break;
174 } 174 }
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 case kNone_BBoxHierarchyType: 825 case kNone_BBoxHierarchyType:
826 return nullptr; 826 return nullptr;
827 case kRTree_BBoxHierarchyType: 827 case kRTree_BBoxHierarchyType:
828 return new SkRTreeFactory; 828 return new SkRTreeFactory;
829 } 829 }
830 SkASSERT(0); // invalid bbhType 830 SkASSERT(0); // invalid bbhType
831 return nullptr; 831 return nullptr;
832 } 832 }
833 833
834 } // namespace sk_tools 834 } // namespace sk_tools
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698