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

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

Issue 315403007: Remove GraphicsContextCG. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/graphics/cg/GraphicsContextCG.h » ('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 (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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "third_party/skia/include/core/SkRefCnt.h" 45 #include "third_party/skia/include/core/SkRefCnt.h"
46 #include "third_party/skia/include/core/SkSurface.h" 46 #include "third_party/skia/include/core/SkSurface.h"
47 #include "third_party/skia/include/effects/SkBlurMaskFilter.h" 47 #include "third_party/skia/include/effects/SkBlurMaskFilter.h"
48 #include "third_party/skia/include/effects/SkCornerPathEffect.h" 48 #include "third_party/skia/include/effects/SkCornerPathEffect.h"
49 #include "third_party/skia/include/effects/SkLumaColorFilter.h" 49 #include "third_party/skia/include/effects/SkLumaColorFilter.h"
50 #include "third_party/skia/include/gpu/GrRenderTarget.h" 50 #include "third_party/skia/include/gpu/GrRenderTarget.h"
51 #include "third_party/skia/include/gpu/GrTexture.h" 51 #include "third_party/skia/include/gpu/GrTexture.h"
52 #include "wtf/Assertions.h" 52 #include "wtf/Assertions.h"
53 #include "wtf/MathExtras.h" 53 #include "wtf/MathExtras.h"
54 54
55 #if OS(MACOSX)
56 #include <ApplicationServices/ApplicationServices.h>
57 #endif
58
59 using namespace std; 55 using namespace std;
60 using blink::WebBlendMode; 56 using blink::WebBlendMode;
61 57
62 namespace WebCore { 58 namespace WebCore {
63 59
64 namespace { 60 namespace {
65 61
66 class CompatibleImageBufferSurface : public ImageBufferSurface { 62 class CompatibleImageBufferSurface : public ImageBufferSurface {
67 WTF_MAKE_NONCOPYABLE(CompatibleImageBufferSurface); WTF_MAKE_FAST_ALLOCATED; 63 WTF_MAKE_NONCOPYABLE(CompatibleImageBufferSurface); WTF_MAKE_FAST_ALLOCATED;
68 public: 64 public:
(...skipping 1666 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 case ColorFilterNone: 1731 case ColorFilterNone:
1736 break; 1732 break;
1737 default: 1733 default:
1738 ASSERT_NOT_REACHED(); 1734 ASSERT_NOT_REACHED();
1739 break; 1735 break;
1740 } 1736 }
1741 1737
1742 return nullptr; 1738 return nullptr;
1743 } 1739 }
1744 1740
1745 #if OS(MACOSX) 1741 #if !OS(MACOSX)
1746 CGColorSpaceRef PLATFORM_EXPORT deviceRGBColorSpaceRef()
1747 {
1748 static CGColorSpaceRef deviceSpace = CGColorSpaceCreateDeviceRGB();
1749 return deviceSpace;
1750 }
1751 #else
1752 void GraphicsContext::draw2xMarker(SkBitmap* bitmap, int index) 1742 void GraphicsContext::draw2xMarker(SkBitmap* bitmap, int index)
1753 { 1743 {
1754 const SkPMColor lineColor = lineColors(index); 1744 const SkPMColor lineColor = lineColors(index);
1755 const SkPMColor antiColor1 = antiColors1(index); 1745 const SkPMColor antiColor1 = antiColors1(index);
1756 const SkPMColor antiColor2 = antiColors2(index); 1746 const SkPMColor antiColor2 = antiColors2(index);
1757 1747
1758 uint32_t* row1 = bitmap->getAddr32(0, 0); 1748 uint32_t* row1 = bitmap->getAddr32(0, 0);
1759 uint32_t* row2 = bitmap->getAddr32(0, 1); 1749 uint32_t* row2 = bitmap->getAddr32(0, 1);
1760 uint32_t* row3 = bitmap->getAddr32(0, 2); 1750 uint32_t* row3 = bitmap->getAddr32(0, 2);
1761 uint32_t* row4 = bitmap->getAddr32(0, 3); 1751 uint32_t* row4 = bitmap->getAddr32(0, 3);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1842 1832
1843 void GraphicsContext::didDrawTextInRect(const SkRect& textRect) 1833 void GraphicsContext::didDrawTextInRect(const SkRect& textRect)
1844 { 1834 {
1845 if (m_trackTextRegion) { 1835 if (m_trackTextRegion) {
1846 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion"); 1836 TRACE_EVENT0("skia", "PlatformContextSkia::trackTextRegion");
1847 m_textRegion.join(textRect); 1837 m_textRegion.join(textRect);
1848 } 1838 }
1849 } 1839 }
1850 1840
1851 } 1841 }
OLDNEW
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/platform/graphics/cg/GraphicsContextCG.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698