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

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

Issue 98703002: Fix compilation with SK_ENABLE_INST_COUNT=1 (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/image/SkSurface.cpp ('k') | src/images/SkImageDecoder.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"
(...skipping 13 matching lines...) Expand all
24 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y, 24 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y,
25 const SkPaint*) SK_OVERRIDE; 25 const SkPaint*) SK_OVERRIDE;
26 virtual void onCopyOnWrite(ContentChangeMode) SK_OVERRIDE; 26 virtual void onCopyOnWrite(ContentChangeMode) SK_OVERRIDE;
27 27
28 private: 28 private:
29 SkGpuDevice* fDevice; 29 SkGpuDevice* fDevice;
30 30
31 typedef SkSurface_Base INHERITED; 31 typedef SkSurface_Base INHERITED;
32 }; 32 };
33 33
34 SK_DEFINE_INST_COUNT(SkSurface_Gpu)
35
36 /////////////////////////////////////////////////////////////////////////////// 34 ///////////////////////////////////////////////////////////////////////////////
37 35
38 SkSurface_Gpu::SkSurface_Gpu(GrContext* ctx, const SkImageInfo& info, 36 SkSurface_Gpu::SkSurface_Gpu(GrContext* ctx, const SkImageInfo& info,
39 int sampleCount) 37 int sampleCount)
40 : INHERITED(info.fWidth, info.fHeight) { 38 : INHERITED(info.fWidth, info.fHeight) {
41 SkBitmap::Config config = SkImageInfoToBitmapConfig(info); 39 SkBitmap::Config config = SkImageInfoToBitmapConfig(info);
42 40
43 fDevice = SkNEW_ARGS(SkGpuDevice, (ctx, config, info.fWidth, info.fHeight, s ampleCount)); 41 fDevice = SkNEW_ARGS(SkGpuDevice, (ctx, config, info.fWidth, info.fHeight, s ampleCount));
44 42
45 if (!SkAlphaTypeIsOpaque(info.fAlphaType)) { 43 if (!SkAlphaTypeIsOpaque(info.fAlphaType)) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 desc.fConfig = SkBitmapConfig2GrPixelConfig(config); 125 desc.fConfig = SkBitmapConfig2GrPixelConfig(config);
128 desc.fSampleCnt = sampleCount; 126 desc.fSampleCnt = sampleCount;
129 127
130 SkAutoTUnref<GrTexture> tex(ctx->createUncachedTexture(desc, NULL, 0)); 128 SkAutoTUnref<GrTexture> tex(ctx->createUncachedTexture(desc, NULL, 0));
131 if (NULL == tex) { 129 if (NULL == tex) {
132 return NULL; 130 return NULL;
133 } 131 }
134 132
135 return SkNEW_ARGS(SkSurface_Gpu, (ctx, tex->asRenderTarget())); 133 return SkNEW_ARGS(SkSurface_Gpu, (ctx, tex->asRenderTarget()));
136 } 134 }
OLDNEW
« no previous file with comments | « src/image/SkSurface.cpp ('k') | src/images/SkImageDecoder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698