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

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2D.cpp

Issue 251023004: WebGL: Free temporary GPU resources held by inactive or hidden WebGL. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use ASSERT instead of 'if' in prepareMailbox() Created 6 years, 5 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. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 4 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2008 Eric Seidel <eric@webkit.org>
6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org> 6 * Copyright (C) 2008 Dirk Schulze <krit@webkit.org>
7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 7 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved. 8 * Copyright (C) 2012, 2013 Intel Corporation. All rights reserved.
9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 9 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
10 * 10 *
(...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after
2259 case MiddleTextBaseline: 2259 case MiddleTextBaseline:
2260 return -fontMetrics.descent() + fontMetrics.height() / 2; 2260 return -fontMetrics.descent() + fontMetrics.height() / 2;
2261 case AlphabeticTextBaseline: 2261 case AlphabeticTextBaseline:
2262 default: 2262 default:
2263 // Do nothing. 2263 // Do nothing.
2264 break; 2264 break;
2265 } 2265 }
2266 return 0; 2266 return 0;
2267 } 2267 }
2268 2268
2269 void CanvasRenderingContext2D::setIsHidden(bool hidden)
2270 {
2271 ImageBuffer* buffer = canvas()->buffer();
2272 if (buffer)
2273 buffer->setIsHidden(hidden);
2274 }
2275
2269 blink::WebLayer* CanvasRenderingContext2D::platformLayer() const 2276 blink::WebLayer* CanvasRenderingContext2D::platformLayer() const
2270 { 2277 {
2271 return canvas()->buffer() ? canvas()->buffer()->platformLayer() : 0; 2278 return canvas()->buffer() ? canvas()->buffer()->platformLayer() : 0;
2272 } 2279 }
2273 2280
2274 bool CanvasRenderingContext2D::imageSmoothingEnabled() const 2281 bool CanvasRenderingContext2D::imageSmoothingEnabled() const
2275 { 2282 {
2276 return state().m_imageSmoothingEnabled; 2283 return state().m_imageSmoothingEnabled;
2277 } 2284 }
2278 2285
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
2446 2453
2447 unsigned CanvasRenderingContext2D::hitRegionsCount() const 2454 unsigned CanvasRenderingContext2D::hitRegionsCount() const
2448 { 2455 {
2449 if (m_hitRegionManager) 2456 if (m_hitRegionManager)
2450 return m_hitRegionManager->getHitRegionsCount(); 2457 return m_hitRegionManager->getHitRegionsCount();
2451 2458
2452 return 0; 2459 return 0;
2453 } 2460 }
2454 2461
2455 } // namespace WebCore 2462 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698