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

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

Issue 685243002: allow SkUserConfig.h to control NOGPU (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') | tests/ReadWriteAlphaTest.cpp » ('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"
11 #include "SkGpuDevice.h" 11 #include "SkGpuDevice.h"
12 12
13 #if SK_SUPPORT_GPU
14
13 class SkSurface_Gpu : public SkSurface_Base { 15 class SkSurface_Gpu : public SkSurface_Base {
14 public: 16 public:
15 SK_DECLARE_INST_COUNT(SkSurface_Gpu) 17 SK_DECLARE_INST_COUNT(SkSurface_Gpu)
16 18
17 SkSurface_Gpu(GrRenderTarget*, const SkSurfaceProps*, bool doClear); 19 SkSurface_Gpu(GrRenderTarget*, const SkSurfaceProps*, bool doClear);
18 virtual ~SkSurface_Gpu(); 20 virtual ~SkSurface_Gpu();
19 21
20 virtual SkCanvas* onNewCanvas() SK_OVERRIDE; 22 virtual SkCanvas* onNewCanvas() SK_OVERRIDE;
21 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE; 23 virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE;
22 virtual SkImage* onNewImageSnapshot() SK_OVERRIDE; 24 virtual SkImage* onNewImageSnapshot() SK_OVERRIDE;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 desc.fSampleCnt = sampleCount; 149 desc.fSampleCnt = sampleCount;
148 150
149 SkAutoTUnref<GrTexture> tex(ctx->refScratchTexture(desc, GrContext::kExact_S cratchTexMatch)); 151 SkAutoTUnref<GrTexture> tex(ctx->refScratchTexture(desc, GrContext::kExact_S cratchTexMatch));
150 152
151 if (NULL == tex) { 153 if (NULL == tex) {
152 return NULL; 154 return NULL;
153 } 155 }
154 156
155 return SkNEW_ARGS(SkSurface_Gpu, (tex->asRenderTarget(), props, true)); 157 return SkNEW_ARGS(SkSurface_Gpu, (tex->asRenderTarget(), props, true));
156 } 158 }
159
160 #endif
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | tests/ReadWriteAlphaTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698