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

Side by Side Diff: Source/platform/graphics/GraphicsContext.cpp

Issue 316863003: Switch Blink to using new Skia SkCanvas::drawPicture method (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address code review comment (fix override in GraphicsContextRecorder) Created 6 years, 6 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
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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 536
537 if (contextDisabled() || displayList->bounds().isEmpty()) 537 if (contextDisabled() || displayList->bounds().isEmpty())
538 return; 538 return;
539 539
540 realizeCanvasSave(); 540 realizeCanvasSave();
541 541
542 const FloatRect& bounds = displayList->bounds(); 542 const FloatRect& bounds = displayList->bounds();
543 if (bounds.x() || bounds.y()) 543 if (bounds.x() || bounds.y())
544 m_canvas->translate(bounds.x(), bounds.y()); 544 m_canvas->translate(bounds.x(), bounds.y());
545 545
546 m_canvas->drawPicture(*displayList->picture()); 546 m_canvas->drawPicture(displayList->picture());
547 547
548 if (bounds.x() || bounds.y()) 548 if (bounds.x() || bounds.y())
549 m_canvas->translate(-bounds.x(), -bounds.y()); 549 m_canvas->translate(-bounds.x(), -bounds.y());
550 } 550 }
551 551
552 void GraphicsContext::setupPaintForFilling(SkPaint* paint) const 552 void GraphicsContext::setupPaintForFilling(SkPaint* paint) const
553 { 553 {
554 if (contextDisabled()) 554 if (contextDisabled())
555 return; 555 return;
556 556
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1842 1842
1843 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) 1843 void GraphicsContext::didDrawTextInRect(const SkRect& textRect)
1844 { 1844 {
1845 if (m_trackTextRegion) { 1845 if (m_trackTextRegion) {
1846 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); 1846 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion");
1847 m_textRegion.join(textRect); 1847 m_textRegion.join(textRect);
1848 } 1848 }
1849 } 1849 }
1850 1850
1851 } 1851 }
OLDNEW
« no previous file with comments | « Source/platform/graphics/DeferredImageDecoderTest.cpp ('k') | Source/platform/graphics/GraphicsContextRecorder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698