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

Side by Side Diff: tests/CachedDecodingPixelRefTest.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/BitmapHeapTest.cpp ('k') | tests/CanvasStateTest.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 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCachingPixelRef.h" 9 #include "SkCachingPixelRef.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 static int Width() { return 10; } 171 static int Width() { return 10; }
172 static int Height() { return 10; } 172 static int Height() { return 10; }
173 static uint32_t Color() { return 0xff123456; } 173 static uint32_t Color() { return 0xff123456; }
174 TestImageGenerator(TestType type, skiatest::Reporter* reporter) 174 TestImageGenerator(TestType type, skiatest::Reporter* reporter)
175 : fType(type), fReporter(reporter) { 175 : fType(type), fReporter(reporter) {
176 SkASSERT((fType <= kLast_TestType) && (fType >= 0)); 176 SkASSERT((fType <= kLast_TestType) && (fType >= 0));
177 } 177 }
178 virtual ~TestImageGenerator() { } 178 virtual ~TestImageGenerator() { }
179 179
180 protected: 180 protected:
181 virtual bool onGetInfo(SkImageInfo* info) SK_OVERRIDE { 181 bool onGetInfo(SkImageInfo* info) SK_OVERRIDE {
182 REPORTER_ASSERT(fReporter, info); 182 REPORTER_ASSERT(fReporter, info);
183 if ((NULL == info) || (kFailGetInfo_TestType == fType)) { 183 if ((NULL == info) || (kFailGetInfo_TestType == fType)) {
184 return false; 184 return false;
185 } 185 }
186 *info = SkImageInfo::MakeN32(TestImageGenerator::Width(), 186 *info = SkImageInfo::MakeN32(TestImageGenerator::Width(),
187 TestImageGenerator::Height(), 187 TestImageGenerator::Height(),
188 kOpaque_SkAlphaType); 188 kOpaque_SkAlphaType);
189 return true; 189 return true;
190 } 190 }
191 191
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 canvas.clear(kDefaultColor); 347 canvas.clear(kDefaultColor);
348 canvas.drawImage(image, 0, 0, NULL); 348 canvas.drawImage(image, 0, 0, NULL);
349 if (TestImageGenerator::kSucceedGetPixels_TestType == test) { 349 if (TestImageGenerator::kSucceedGetPixels_TestType == test) {
350 REPORTER_ASSERT( 350 REPORTER_ASSERT(
351 r, TestImageGenerator::Color() == *bitmap.getAddr32(0, 0)); 351 r, TestImageGenerator::Color() == *bitmap.getAddr32(0, 0));
352 } else { 352 } else {
353 REPORTER_ASSERT(r, kDefaultColor == bitmap.getColor(0,0)); 353 REPORTER_ASSERT(r, kDefaultColor == bitmap.getColor(0,0));
354 } 354 }
355 } 355 }
356 } 356 }
OLDNEW
« no previous file with comments | « tests/BitmapHeapTest.cpp ('k') | tests/CanvasStateTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698