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

Side by Side Diff: tests/CanvasStateTest.cpp

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 years, 8 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/CachedDecodingPixelRefTest.cpp ('k') | tests/CanvasTest.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 "CanvasStateHelpers.h" 8 #include "CanvasStateHelpers.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkCanvasStateUtils.h" 10 #include "SkCanvasStateUtils.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 REPORTER_ASSERT(reporter, !memcmp(bitmaps[0].getPixels(), 247 REPORTER_ASSERT(reporter, !memcmp(bitmaps[0].getPixels(),
248 bitmaps[1].getPixels(), 248 bitmaps[1].getPixels(),
249 bitmaps[0].getSize())); 249 bitmaps[0].getSize()));
250 } 250 }
251 #endif 251 #endif
252 252
253 //////////////////////////////////////////////////////////////////////////////// 253 ////////////////////////////////////////////////////////////////////////////////
254 254
255 class TestDrawFilter : public SkDrawFilter { 255 class TestDrawFilter : public SkDrawFilter {
256 public: 256 public:
257 bool filter(SkPaint*, Type) SK_OVERRIDE { return true; } 257 bool filter(SkPaint*, Type) override { return true; }
258 }; 258 };
259 259
260 DEF_TEST(CanvasState_test_draw_filters, reporter) { 260 DEF_TEST(CanvasState_test_draw_filters, reporter) {
261 TestDrawFilter drawFilter; 261 TestDrawFilter drawFilter;
262 SkBitmap bitmap; 262 SkBitmap bitmap;
263 bitmap.allocN32Pixels(10, 10); 263 bitmap.allocN32Pixels(10, 10);
264 SkCanvas canvas(bitmap); 264 SkCanvas canvas(bitmap);
265 265
266 canvas.setDrawFilter(&drawFilter); 266 canvas.setDrawFilter(&drawFilter);
267 267
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 // Check that saveLayer with the kClipToLayer_SaveFlag sets the clip 328 // Check that saveLayer with the kClipToLayer_SaveFlag sets the clip
329 // stack to the layer bounds. 329 // stack to the layer bounds.
330 canvas.saveLayer(&bounds, NULL, SkCanvas::kARGB_ClipLayer_SaveFlag); 330 canvas.saveLayer(&bounds, NULL, SkCanvas::kARGB_ClipLayer_SaveFlag);
331 canvas.getClipStack()->getBounds(&clipStackBounds, &boundsType); 331 canvas.getClipStack()->getBounds(&clipStackBounds, &boundsType);
332 REPORTER_ASSERT(reporter, clipStackBounds.width() == LAYER_WIDTH); 332 REPORTER_ASSERT(reporter, clipStackBounds.width() == LAYER_WIDTH);
333 REPORTER_ASSERT(reporter, clipStackBounds.height() == LAYER_HEIGHT); 333 REPORTER_ASSERT(reporter, clipStackBounds.height() == LAYER_HEIGHT);
334 334
335 canvas.restore(); 335 canvas.restore();
336 } 336 }
337 #endif 337 #endif
OLDNEW
« no previous file with comments | « tests/CachedDecodingPixelRefTest.cpp ('k') | tests/CanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698