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

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

Issue 17448009: Use skia::RefPtr to avoid having to manually refcount GraphicsContextState::m_looper. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 { 1649 {
1650 #if defined(SK_DEBUG) 1650 #if defined(SK_DEBUG)
1651 { 1651 {
1652 SkPaint defaultPaint; 1652 SkPaint defaultPaint;
1653 SkASSERT(*paint == defaultPaint); 1653 SkASSERT(*paint == defaultPaint);
1654 } 1654 }
1655 #endif 1655 #endif
1656 1656
1657 paint->setAntiAlias(m_state->m_shouldAntialias); 1657 paint->setAntiAlias(m_state->m_shouldAntialias);
1658 paint->setXfermodeMode(m_state->m_xferMode); 1658 paint->setXfermodeMode(m_state->m_xferMode);
1659 paint->setLooper(m_state->m_looper); 1659 paint->setLooper(m_state->m_looper.get());
1660 } 1660 }
1661 1661
1662 void GraphicsContext::drawOuterPath(const SkPath& path, SkPaint& paint, int widt h) 1662 void GraphicsContext::drawOuterPath(const SkPath& path, SkPaint& paint, int widt h)
1663 { 1663 {
1664 #if OS(DARWIN) 1664 #if OS(DARWIN)
1665 paint.setAlpha(64); 1665 paint.setAlpha(64);
1666 paint.setStrokeWidth(width); 1666 paint.setStrokeWidth(width);
1667 paint.setPathEffect(new SkCornerPathEffect((width - 1) * 0.5f))->unref(); 1667 paint.setPathEffect(new SkCornerPathEffect((width - 1) * 0.5f))->unref();
1668 #else 1668 #else
1669 paint.setStrokeWidth(1); 1669 paint.setStrokeWidth(1);
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
1827 1827
1828 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) 1828 void GraphicsContext::didDrawTextInRect(const SkRect& textRect)
1829 { 1829 {
1830 if (m_trackTextRegion) { 1830 if (m_trackTextRegion) {
1831 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); 1831 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion");
1832 m_textRegion.join(textRect); 1832 m_textRegion.join(textRect);
1833 } 1833 }
1834 } 1834 }
1835 1835
1836 } 1836 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698