Yet more ASAN fixes.
More nullptr checks for factories I have added. Other checks more Yoda-like I have made. (Skia style this is.) BUG=skia: Review URL: https://codereview.chromium.org/1086393004
This commit is contained in:
parent
84bfd3958f
commit
c8e934007a
@ -1141,6 +1141,9 @@ const SkSurfaceProps gProps = SkSurfaceProps(SkSurfaceProps::kLegacyFontHost_Ini
|
||||
|
||||
DEF_GPUTEST(ImageFilterCropRectGPU, reporter, factory) {
|
||||
GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(0));
|
||||
if (NULL == context) {
|
||||
return;
|
||||
}
|
||||
SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context,
|
||||
SkSurface::kNo_Budgeted,
|
||||
SkImageInfo::MakeN32Premul(100, 100),
|
||||
@ -1151,6 +1154,9 @@ DEF_GPUTEST(ImageFilterCropRectGPU, reporter, factory) {
|
||||
|
||||
DEF_GPUTEST(HugeBlurImageFilterGPU, reporter, factory) {
|
||||
GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(0));
|
||||
if (NULL == context) {
|
||||
return;
|
||||
}
|
||||
SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context,
|
||||
SkSurface::kNo_Budgeted,
|
||||
SkImageInfo::MakeN32Premul(100, 100),
|
||||
@ -1161,6 +1167,9 @@ DEF_GPUTEST(HugeBlurImageFilterGPU, reporter, factory) {
|
||||
|
||||
DEF_GPUTEST(XfermodeImageFilterCroppedInputGPU, reporter, factory) {
|
||||
GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(0));
|
||||
if (NULL == context) {
|
||||
return;
|
||||
}
|
||||
SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context,
|
||||
SkSurface::kNo_Budgeted,
|
||||
SkImageInfo::MakeN32Premul(1, 1),
|
||||
@ -1171,6 +1180,9 @@ DEF_GPUTEST(XfermodeImageFilterCroppedInputGPU, reporter, factory) {
|
||||
|
||||
DEF_GPUTEST(TestNegativeBlurSigmaGPU, reporter, factory) {
|
||||
GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(0));
|
||||
if (NULL == context) {
|
||||
return;
|
||||
}
|
||||
SkAutoTUnref<SkGpuDevice> device(SkGpuDevice::Create(context,
|
||||
SkSurface::kNo_Budgeted,
|
||||
SkImageInfo::MakeN32Premul(1, 1),
|
||||
|
@ -251,7 +251,7 @@ static void test_imagepeek(skiatest::Reporter* reporter, GrContextFactory* facto
|
||||
GrContext* ctx = NULL;
|
||||
#if SK_SUPPORT_GPU
|
||||
ctx = factory->get(GrContextFactory::kNative_GLContextType);
|
||||
if (!ctx) {
|
||||
if (NULL == ctx) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -242,7 +242,7 @@ static void test_path(GrDrawTarget* dt, GrRenderTarget* rt, const SkPath& path)
|
||||
|
||||
DEF_GPUTEST(TessellatingPathRendererTests, reporter, factory) {
|
||||
GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(0));
|
||||
if (!context) {
|
||||
if (NULL == context) {
|
||||
return;
|
||||
}
|
||||
GrSurfaceDesc desc;
|
||||
|
Loading…
Reference in New Issue
Block a user