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: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp

Issue 2825183002: Plumb CanvasColorParams to canvas image classes (Closed)
Patch Set: Require both runtime flags Created 3 years, 8 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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 5 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 7 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 8 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. 9 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved.
10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 10 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 980
981 WebLayer* CanvasRenderingContext2D::PlatformLayer() const { 981 WebLayer* CanvasRenderingContext2D::PlatformLayer() const {
982 return canvas()->Buffer() ? canvas()->Buffer()->PlatformLayer() : 0; 982 return canvas()->Buffer() ? canvas()->Buffer()->PlatformLayer() : 0;
983 } 983 }
984 984
985 void CanvasRenderingContext2D::getContextAttributes( 985 void CanvasRenderingContext2D::getContextAttributes(
986 CanvasRenderingContext2DSettings& settings) const { 986 CanvasRenderingContext2DSettings& settings) const {
987 settings.setAlpha(CreationAttributes().alpha()); 987 settings.setAlpha(CreationAttributes().alpha());
988 settings.setColorSpace(ColorSpaceAsString()); 988 settings.setColorSpace(ColorSpaceAsString());
989 settings.setPixelFormat(PixelFormatAsString()); 989 settings.setPixelFormat(PixelFormatAsString());
990 settings.setLinearPixelMath(LinearPixelMath()); 990 settings.setLinearPixelMath(color_params().LinearPixelMath());
991 } 991 }
992 992
993 void CanvasRenderingContext2D::drawFocusIfNeeded(Element* element) { 993 void CanvasRenderingContext2D::drawFocusIfNeeded(Element* element) {
994 DrawFocusIfNeededInternal(path_, element); 994 DrawFocusIfNeededInternal(path_, element);
995 } 995 }
996 996
997 void CanvasRenderingContext2D::drawFocusIfNeeded(Path2D* path2d, 997 void CanvasRenderingContext2D::drawFocusIfNeeded(Path2D* path2d,
998 Element* element) { 998 Element* element) {
999 DrawFocusIfNeededInternal(path2d->GetPath(), element); 999 DrawFocusIfNeededInternal(path2d->GetPath(), element);
1000 } 1000 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 } 1177 }
1178 return true; 1178 return true;
1179 } 1179 }
1180 1180
1181 void CanvasRenderingContext2D::ResetUsageTracking() { 1181 void CanvasRenderingContext2D::ResetUsageTracking() {
1182 UsageCounters new_counters; 1182 UsageCounters new_counters;
1183 usage_counters_ = new_counters; 1183 usage_counters_ = new_counters;
1184 } 1184 }
1185 1185
1186 } // namespace blink 1186 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698