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

Side by Side Diff: sky/engine/platform/graphics/GraphicsContext.cpp

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 void GraphicsContext::clipRRect(const SkRRect& rect, AntiAliasingMode aa, SkRegi on::Op op) 1464 void GraphicsContext::clipRRect(const SkRRect& rect, AntiAliasingMode aa, SkRegi on::Op op)
1465 { 1465 {
1466 if (contextDisabled()) 1466 if (contextDisabled())
1467 return; 1467 return;
1468 1468
1469 realizeCanvasSave(); 1469 realizeCanvasSave();
1470 1470
1471 m_canvas->clipRRect(rect, op, aa == AntiAliased); 1471 m_canvas->clipRRect(rect, op, aa == AntiAliased);
1472 } 1472 }
1473 1473
1474 void GraphicsContext::beginCull(const FloatRect& rect)
1475 {
1476 if (contextDisabled())
1477 return;
1478
1479 realizeCanvasSave();
1480 m_canvas->pushCull(rect);
1481 }
1482
1483 void GraphicsContext::endCull()
1484 {
1485 if (contextDisabled())
1486 return;
1487
1488 realizeCanvasSave();
1489
1490 m_canvas->popCull();
1491 }
1492
1493 void GraphicsContext::rotate(float angleInRadians) 1474 void GraphicsContext::rotate(float angleInRadians)
1494 { 1475 {
1495 if (contextDisabled()) 1476 if (contextDisabled())
1496 return; 1477 return;
1497 1478
1498 realizeCanvasSave(); 1479 realizeCanvasSave();
1499 1480
1500 m_canvas->rotate(WebCoreFloatToSkScalar(angleInRadians * (180.0f / 3.1415926 5f))); 1481 m_canvas->rotate(WebCoreFloatToSkScalar(angleInRadians * (180.0f / 3.1415926 5f)));
1501 } 1482 }
1502 1483
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 // FIXME: This is to not break tests (it results in the filter bitmap fl ag 1847 // FIXME: This is to not break tests (it results in the filter bitmap fl ag
1867 // being set to true). We need to decide if we respect InterpolationNone 1848 // being set to true). We need to decide if we respect InterpolationNone
1868 // being returned from computeInterpolationQuality. 1849 // being returned from computeInterpolationQuality.
1869 resampling = InterpolationLow; 1850 resampling = InterpolationLow;
1870 } 1851 }
1871 resampling = limitInterpolationQuality(this, resampling); 1852 resampling = limitInterpolationQuality(this, resampling);
1872 paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling)); 1853 paint->setFilterLevel(static_cast<SkPaint::FilterLevel>(resampling));
1873 } 1854 }
1874 1855
1875 } // namespace blink 1856 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/platform/graphics/GraphicsContext.h ('k') | sky/engine/platform/graphics/GraphicsContextCullSaver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698