Index: src/image/SkSurface_Gpu.cpp |
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp |
index fab130cdde19130cbc8efca7dcc1e46fd8a76198..a34b774397b11e9539d5c67264fc24bbe1d4b426 100644 |
--- a/src/image/SkSurface_Gpu.cpp |
+++ b/src/image/SkSurface_Gpu.cpp |
@@ -14,8 +14,7 @@ |
public: |
SK_DECLARE_INST_COUNT(SkSurface_Gpu) |
- SkSurface_Gpu(GrRenderTarget*, bool cached, TextRenderMode trm, |
- SkSurface::RenderTargetFlags flags); |
+ SkSurface_Gpu(GrRenderTarget*, bool cached, TextRenderMode trm); |
virtual ~SkSurface_Gpu(); |
virtual SkCanvas* onNewCanvas() SK_OVERRIDE; |
@@ -34,16 +33,14 @@ |
/////////////////////////////////////////////////////////////////////////////// |
-SkSurface_Gpu::SkSurface_Gpu(GrRenderTarget* renderTarget, bool cached, TextRenderMode trm, |
- SkSurface::RenderTargetFlags flags) |
+SkSurface_Gpu::SkSurface_Gpu(GrRenderTarget* renderTarget, bool cached, TextRenderMode trm) |
: INHERITED(renderTarget->width(), renderTarget->height()) { |
- int deviceFlags = 0; |
- deviceFlags |= cached ? SkGpuDevice::kCached_Flag : 0; |
- deviceFlags |= (kDistanceField_TextRenderMode == trm) ? SkGpuDevice::kDFFonts_Flag : 0; |
- fDevice = SkGpuDevice::Create(renderTarget, deviceFlags); |
+ int flags = 0; |
+ flags |= cached ? SkGpuDevice::kCached_Flag : 0; |
+ flags |= (kDistanceField_TextRenderMode == trm) ? SkGpuDevice::kDFFonts_Flag : 0; |
+ fDevice = SkGpuDevice::Create(renderTarget, flags); |
- if (kRGB_565_GrPixelConfig != renderTarget->config() && |
- !(flags & kDontClear_RenderTargetFlag)) { |
+ if (kRGB_565_GrPixelConfig != renderTarget->config()) { |
fDevice->clear(0x0); |
} |
} |
@@ -104,16 +101,15 @@ |
/////////////////////////////////////////////////////////////////////////////// |
-SkSurface* SkSurface::NewRenderTargetDirect(GrRenderTarget* target, TextRenderMode trm, |
- RenderTargetFlags flags) { |
+SkSurface* SkSurface::NewRenderTargetDirect(GrRenderTarget* target, TextRenderMode trm) { |
if (NULL == target) { |
return NULL; |
} |
- return SkNEW_ARGS(SkSurface_Gpu, (target, false, trm, flags)); |
+ return SkNEW_ARGS(SkSurface_Gpu, (target, false, trm)); |
} |
SkSurface* SkSurface::NewRenderTarget(GrContext* ctx, const SkImageInfo& info, int sampleCount, |
- TextRenderMode trm, RenderTargetFlags flags) { |
+ TextRenderMode trm) { |
if (NULL == ctx) { |
return NULL; |
} |
@@ -130,12 +126,11 @@ |
return NULL; |
} |
- return SkNEW_ARGS(SkSurface_Gpu, (tex->asRenderTarget(), false, trm, flags)); |
+ return SkNEW_ARGS(SkSurface_Gpu, (tex->asRenderTarget(), false, trm)); |
} |
SkSurface* SkSurface::NewScratchRenderTarget(GrContext* ctx, const SkImageInfo& info, |
- int sampleCount, TextRenderMode trm, |
- RenderTargetFlags flags) { |
+ int sampleCount, TextRenderMode trm) { |
if (NULL == ctx) { |
return NULL; |
} |
@@ -153,5 +148,5 @@ |
return NULL; |
} |
- return SkNEW_ARGS(SkSurface_Gpu, (tex->asRenderTarget(), true, trm, flags)); |
+ return SkNEW_ARGS(SkSurface_Gpu, (tex->asRenderTarget(), true, trm)); |
} |