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

Side by Side Diff: src/image/SkSurface_Gpu.cpp

Issue 707723005: Revert of Get gpudft support working in dm, gm, nanobench and bench_pictures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 1 month 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/SkGpuDevice.cpp ('k') | tools/PictureRenderer.h » ('j') | 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 "SkSurface_Base.h" 8 #include "SkSurface_Base.h"
9 #include "SkImagePriv.h" 9 #include "SkImagePriv.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 21 matching lines...) Expand all
32 32
33 typedef SkSurface_Base INHERITED; 33 typedef SkSurface_Base INHERITED;
34 }; 34 };
35 35
36 /////////////////////////////////////////////////////////////////////////////// 36 ///////////////////////////////////////////////////////////////////////////////
37 37
38 SkSurface_Gpu::SkSurface_Gpu(GrRenderTarget* renderTarget, const SkSurfaceProps* props, 38 SkSurface_Gpu::SkSurface_Gpu(GrRenderTarget* renderTarget, const SkSurfaceProps* props,
39 bool doClear) 39 bool doClear)
40 : INHERITED(renderTarget->width(), renderTarget->height(), props) { 40 : INHERITED(renderTarget->width(), renderTarget->height(), props) {
41 int deviceFlags = 0; 41 int deviceFlags = 0;
42 deviceFlags |= this->props().isUseDistanceFieldFonts() ? SkGpuDevice::kDFTex t_Flag : 0; 42 deviceFlags |= this->props().isUseDistanceFieldFonts() ? SkGpuDevice::kDFFon ts_Flag : 0;
43 fDevice = SkGpuDevice::Create(renderTarget, this->props(), deviceFlags); 43 fDevice = SkGpuDevice::Create(renderTarget, this->props(), deviceFlags);
44 44
45 if (kRGB_565_GrPixelConfig != renderTarget->config() && doClear) { 45 if (kRGB_565_GrPixelConfig != renderTarget->config() && doClear) {
46 fDevice->clear(0x0); 46 fDevice->clear(0x0);
47 } 47 }
48 } 48 }
49 49
50 SkSurface_Gpu::~SkSurface_Gpu() { 50 SkSurface_Gpu::~SkSurface_Gpu() {
51 SkSafeUnref(fDevice); 51 SkSafeUnref(fDevice);
52 } 52 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 SkAutoTUnref<GrTexture> tex(ctx->refScratchTexture(desc, GrContext::kExact_S cratchTexMatch)); 151 SkAutoTUnref<GrTexture> tex(ctx->refScratchTexture(desc, GrContext::kExact_S cratchTexMatch));
152 152
153 if (NULL == tex) { 153 if (NULL == tex) {
154 return NULL; 154 return NULL;
155 } 155 }
156 156
157 return SkNEW_ARGS(SkSurface_Gpu, (tex->asRenderTarget(), props, true)); 157 return SkNEW_ARGS(SkSurface_Gpu, (tex->asRenderTarget(), props, true));
158 } 158 }
159 159
160 #endif 160 #endif
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | tools/PictureRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698