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

Side by Side Diff: tests/PDFPrimitivesTest.cpp

Issue 806653007: Fix up all the easy virtual ... SK_OVERRIDE cases. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 11 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
« no previous file with comments | « tests/PDFInvalidBitmapTest.cpp ('k') | tests/PathOpsSkpClipTest.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 2010 The Android Open Source Project 2 * Copyright 2010 The Android Open Source Project
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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkData.h" 10 #include "SkData.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 test_issue1083(); 428 test_issue1083();
429 429
430 TestImages(reporter); 430 TestImages(reporter);
431 } 431 }
432 432
433 namespace { 433 namespace {
434 434
435 class DummyImageFilter : public SkImageFilter { 435 class DummyImageFilter : public SkImageFilter {
436 public: 436 public:
437 DummyImageFilter(bool visited = false) : SkImageFilter(0, NULL), fVisited(vi sited) {} 437 DummyImageFilter(bool visited = false) : SkImageFilter(0, NULL), fVisited(vi sited) {}
438 virtual ~DummyImageFilter() SK_OVERRIDE {} 438 ~DummyImageFilter() SK_OVERRIDE {}
439 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&, 439 virtual bool onFilterImage(Proxy*, const SkBitmap& src, const Context&,
440 SkBitmap* result, SkIPoint* offset) const { 440 SkBitmap* result, SkIPoint* offset) const {
441 fVisited = true; 441 fVisited = true;
442 offset->fX = offset->fY = 0; 442 offset->fX = offset->fY = 0;
443 *result = src; 443 *result = src;
444 return true; 444 return true;
445 } 445 }
446 SK_TO_STRING_OVERRIDE() 446 SK_TO_STRING_OVERRIDE()
447 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(DummyImageFilter) 447 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(DummyImageFilter)
448 bool visited() const { return fVisited; } 448 bool visited() const { return fVisited; }
(...skipping 27 matching lines...) Expand all
476 476
477 // Filter just created; should be unvisited. 477 // Filter just created; should be unvisited.
478 REPORTER_ASSERT(reporter, !filter->visited()); 478 REPORTER_ASSERT(reporter, !filter->visited());
479 SkPaint paint; 479 SkPaint paint;
480 paint.setImageFilter(filter.get()); 480 paint.setImageFilter(filter.get());
481 canvas.drawRect(SkRect::MakeWH(100, 100), paint); 481 canvas.drawRect(SkRect::MakeWH(100, 100), paint);
482 482
483 // Filter was used in rendering; should be visited. 483 // Filter was used in rendering; should be visited.
484 REPORTER_ASSERT(reporter, filter->visited()); 484 REPORTER_ASSERT(reporter, filter->visited());
485 } 485 }
OLDNEW
« no previous file with comments | « tests/PDFInvalidBitmapTest.cpp ('k') | tests/PathOpsSkpClipTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698