OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkRRect.h" | 9 #include "SkRRect.h" |
10 #include "SkSurface.h" | 10 #include "SkSurface.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 const SkPoint testPoints[3] = { | 77 const SkPoint testPoints[3] = { |
78 {SkIntToScalar(0), SkIntToScalar(0)}, | 78 {SkIntToScalar(0), SkIntToScalar(0)}, |
79 {SkIntToScalar(2), SkIntToScalar(1)}, | 79 {SkIntToScalar(2), SkIntToScalar(1)}, |
80 {SkIntToScalar(0), SkIntToScalar(2)} | 80 {SkIntToScalar(0), SkIntToScalar(2)} |
81 }; | 81 }; |
82 const size_t testPointCount = 3; | 82 const size_t testPointCount = 3; |
83 | 83 |
84 SkBitmap testBitmap; | 84 SkBitmap testBitmap; |
85 testBitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10); | 85 testBitmap.setConfig(SkBitmap::kARGB_8888_Config, 10, 10); |
86 testBitmap.allocPixels(); | 86 testBitmap.allocPixels(); |
| 87 testBitmap.eraseColor(0); |
87 | 88 |
88 SkRRect testRRect; | 89 SkRRect testRRect; |
89 testRRect.setRectXY(testRect, SK_Scalar1, SK_Scalar1); | 90 testRRect.setRectXY(testRect, SK_Scalar1, SK_Scalar1); |
90 | 91 |
91 SkString testText("Hello World"); | 92 SkString testText("Hello World"); |
92 const SkPoint testPoints2[] = { | 93 const SkPoint testPoints2[] = { |
93 { SkIntToScalar(0), SkIntToScalar(1) }, | 94 { SkIntToScalar(0), SkIntToScalar(1) }, |
94 { SkIntToScalar(1), SkIntToScalar(1) }, | 95 { SkIntToScalar(1), SkIntToScalar(1) }, |
95 { SkIntToScalar(2), SkIntToScalar(1) }, | 96 { SkIntToScalar(2), SkIntToScalar(1) }, |
96 { SkIntToScalar(3), SkIntToScalar(1) }, | 97 { SkIntToScalar(3), SkIntToScalar(1) }, |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 TestSurfaceWritableAfterSnapshotRelease(reporter, kGpu_SurfaceType, cont
ext); | 248 TestSurfaceWritableAfterSnapshotRelease(reporter, kGpu_SurfaceType, cont
ext); |
248 TestSurfaceNoCanvas(reporter, kGpu_SurfaceType, context, SkSurface::kDis
card_ContentChangeMode); | 249 TestSurfaceNoCanvas(reporter, kGpu_SurfaceType, context, SkSurface::kDis
card_ContentChangeMode); |
249 TestSurfaceNoCanvas(reporter, kGpu_SurfaceType, context, SkSurface::kRet
ain_ContentChangeMode); | 250 TestSurfaceNoCanvas(reporter, kGpu_SurfaceType, context, SkSurface::kRet
ain_ContentChangeMode); |
250 TestGetTexture(reporter, kGpu_SurfaceType, context); | 251 TestGetTexture(reporter, kGpu_SurfaceType, context); |
251 } | 252 } |
252 #endif | 253 #endif |
253 } | 254 } |
254 | 255 |
255 #include "TestClassDef.h" | 256 #include "TestClassDef.h" |
256 DEFINE_GPUTESTCLASS("Surface", SurfaceTestClass, TestSurface) | 257 DEFINE_GPUTESTCLASS("Surface", SurfaceTestClass, TestSurface) |
OLD | NEW |