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

Side by Side Diff: tests/SurfaceTest.cpp

Issue 933483002: add Method param to drawTextOnPath, supporting SVG spec Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add guard for android Created 5 years, 10 months 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
« src/utils/SkDeferredCanvas.cpp ('K') | « tests/PictureTest.cpp ('k') | no next file » | 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 2013 Google Inc. 2 * Copyright 2013 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 "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkData.h" 9 #include "SkData.h"
10 #include "SkImageEncoder.h" 10 #include "SkImageEncoder.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 EXPECT_COPY_ON_WRITE(drawRRect(testRRect, testPaint)) 381 EXPECT_COPY_ON_WRITE(drawRRect(testRRect, testPaint))
382 EXPECT_COPY_ON_WRITE(drawPath(testPath, testPaint)) 382 EXPECT_COPY_ON_WRITE(drawPath(testPath, testPaint))
383 EXPECT_COPY_ON_WRITE(drawBitmap(testBitmap, 0, 0)) 383 EXPECT_COPY_ON_WRITE(drawBitmap(testBitmap, 0, 0))
384 EXPECT_COPY_ON_WRITE(drawBitmapRect(testBitmap, NULL, testRect)) 384 EXPECT_COPY_ON_WRITE(drawBitmapRect(testBitmap, NULL, testRect))
385 EXPECT_COPY_ON_WRITE(drawBitmapNine(testBitmap, testIRect, testRect, NULL)) 385 EXPECT_COPY_ON_WRITE(drawBitmapNine(testBitmap, testIRect, testRect, NULL))
386 EXPECT_COPY_ON_WRITE(drawSprite(testBitmap, 0, 0, NULL)) 386 EXPECT_COPY_ON_WRITE(drawSprite(testBitmap, 0, 0, NULL))
387 EXPECT_COPY_ON_WRITE(drawText(testText.c_str(), testText.size(), 0, 1, testP aint)) 387 EXPECT_COPY_ON_WRITE(drawText(testText.c_str(), testText.size(), 0, 1, testP aint))
388 EXPECT_COPY_ON_WRITE(drawPosText(testText.c_str(), testText.size(), testPoin ts2, \ 388 EXPECT_COPY_ON_WRITE(drawPosText(testText.c_str(), testText.size(), testPoin ts2, \
389 testPaint)) 389 testPaint))
390 EXPECT_COPY_ON_WRITE(drawTextOnPath(testText.c_str(), testText.size(), testP ath, NULL, \ 390 EXPECT_COPY_ON_WRITE(drawTextOnPath(testText.c_str(), testText.size(), testP ath, NULL, \
391 testPaint)) 391 SkCanvas::kStretch_TextOnPathMethod, testPaint))
392 } 392 }
393 393
394 static void TestSurfaceWritableAfterSnapshotRelease(skiatest::Reporter* reporter , 394 static void TestSurfaceWritableAfterSnapshotRelease(skiatest::Reporter* reporter ,
395 SurfaceType surfaceType, 395 SurfaceType surfaceType,
396 GrContext* context) { 396 GrContext* context) {
397 // This test succeeds by not triggering an assertion. 397 // This test succeeds by not triggering an assertion.
398 // The test verifies that the surface remains writable (usable) after 398 // The test verifies that the surface remains writable (usable) after
399 // acquiring and releasing a snapshot without triggering a copy on write. 399 // acquiring and releasing a snapshot without triggering a copy on write.
400 SkAutoTUnref<SkSurface> surface(createSurface(surfaceType, context)); 400 SkAutoTUnref<SkSurface> surface(createSurface(surfaceType, context));
401 SkCanvas* canvas = surface->getCanvas(); 401 SkCanvas* canvas = surface->getCanvas();
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 TestSurfaceNoCanvas(reporter, kGpuScratch_SurfaceType, context, SkSurface::kRetain_ContentChangeMode); 570 TestSurfaceNoCanvas(reporter, kGpuScratch_SurfaceType, context, SkSurface::kRetain_ContentChangeMode);
571 TestGetTexture(reporter, kGpu_SurfaceType, context); 571 TestGetTexture(reporter, kGpu_SurfaceType, context);
572 TestGetTexture(reporter, kGpuScratch_SurfaceType, context); 572 TestGetTexture(reporter, kGpuScratch_SurfaceType, context);
573 test_empty_surface(reporter, context); 573 test_empty_surface(reporter, context);
574 test_surface_budget(reporter, context); 574 test_surface_budget(reporter, context);
575 } 575 }
576 } 576 }
577 } 577 }
578 #endif 578 #endif
579 } 579 }
OLDNEW
« src/utils/SkDeferredCanvas.cpp ('K') | « tests/PictureTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698