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

Side by Side Diff: tests/CanvasStateTest.cpp

Issue 1265033002: IWYU: 'core' target, files starting A-C. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase (a file was deleted). Created 5 years, 4 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/BlurTest.cpp ('k') | tests/ClipCubicTest.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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 SkSetErrorCallback(error_callback, NULL); 295 SkSetErrorCallback(error_callback, NULL);
296 296
297 SkCanvasState* state = SkCanvasStateUtils::CaptureCanvasState(&canvas); 297 SkCanvasState* state = SkCanvasStateUtils::CaptureCanvasState(&canvas);
298 REPORTER_ASSERT(reporter, !state); 298 REPORTER_ASSERT(reporter, !state);
299 299
300 REPORTER_ASSERT(reporter, kInvalidOperation_SkError == SkGetLastError()); 300 REPORTER_ASSERT(reporter, kInvalidOperation_SkError == SkGetLastError());
301 SkClearLastError(); 301 SkClearLastError();
302 } 302 }
303 303
304 #ifdef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG 304 #ifdef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
305 #include "SkClipStack.h"
305 DEF_TEST(CanvasState_test_saveLayer_clip, reporter) { 306 DEF_TEST(CanvasState_test_saveLayer_clip, reporter) {
306 const int WIDTH = 100; 307 const int WIDTH = 100;
307 const int HEIGHT = 100; 308 const int HEIGHT = 100;
308 const int LAYER_WIDTH = 50; 309 const int LAYER_WIDTH = 50;
309 const int LAYER_HEIGHT = 50; 310 const int LAYER_HEIGHT = 50;
310 311
311 SkBitmap bitmap; 312 SkBitmap bitmap;
312 bitmap.allocN32Pixels(WIDTH, HEIGHT); 313 bitmap.allocN32Pixels(WIDTH, HEIGHT);
313 SkCanvas canvas(bitmap); 314 SkCanvas canvas(bitmap);
314 315
(...skipping 13 matching lines...) Expand all
328 // Check that saveLayer with the kClipToLayer_SaveFlag sets the clip 329 // Check that saveLayer with the kClipToLayer_SaveFlag sets the clip
329 // stack to the layer bounds. 330 // stack to the layer bounds.
330 canvas.saveLayer(&bounds, NULL, SkCanvas::kARGB_ClipLayer_SaveFlag); 331 canvas.saveLayer(&bounds, NULL, SkCanvas::kARGB_ClipLayer_SaveFlag);
331 canvas.getClipStack()->getBounds(&clipStackBounds, &boundsType); 332 canvas.getClipStack()->getBounds(&clipStackBounds, &boundsType);
332 REPORTER_ASSERT(reporter, clipStackBounds.width() == LAYER_WIDTH); 333 REPORTER_ASSERT(reporter, clipStackBounds.width() == LAYER_WIDTH);
333 REPORTER_ASSERT(reporter, clipStackBounds.height() == LAYER_HEIGHT); 334 REPORTER_ASSERT(reporter, clipStackBounds.height() == LAYER_HEIGHT);
334 335
335 canvas.restore(); 336 canvas.restore();
336 } 337 }
337 #endif 338 #endif
OLDNEW
« no previous file with comments | « tests/BlurTest.cpp ('k') | tests/ClipCubicTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698