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

Side by Side Diff: Source/core/html/HTMLCanvasElement.cpp

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed config.gni. Minor cleanups. 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 m_imageBuffer->context()->setImageInterpolationQuality(CanvasDefaultInterpol ationQuality); 503 m_imageBuffer->context()->setImageInterpolationQuality(CanvasDefaultInterpol ationQuality);
504 // Enabling MSAA overrides a request to disable antialiasing. This is true r egardless of whether the 504 // Enabling MSAA overrides a request to disable antialiasing. This is true r egardless of whether the
505 // rendering mode is accelerated or not. For consistency, we don't want to a pply AA in accelerated 505 // rendering mode is accelerated or not. For consistency, we don't want to a pply AA in accelerated
506 // canvases but not in unaccelerated canvases. 506 // canvases but not in unaccelerated canvases.
507 if (!msaaSampleCount && document().settings() && !document().settings()->ant ialiased2dCanvasEnabled()) 507 if (!msaaSampleCount && document().settings() && !document().settings()->ant ialiased2dCanvasEnabled())
508 m_imageBuffer->context()->setShouldAntialias(false); 508 m_imageBuffer->context()->setShouldAntialias(false);
509 // GraphicsContext's defaults don't always agree with the 2d canvas spec. 509 // GraphicsContext's defaults don't always agree with the 2d canvas spec.
510 // See CanvasRenderingContext2D::State::State() for more information. 510 // See CanvasRenderingContext2D::State::State() for more information.
511 m_imageBuffer->context()->setMiterLimit(10); 511 m_imageBuffer->context()->setMiterLimit(10);
512 m_imageBuffer->context()->setStrokeThickness(1); 512 m_imageBuffer->context()->setStrokeThickness(1);
513 #if ASSERT_ENABLED 513 #if ENABLE(ASSERT)
514 m_imageBuffer->context()->disableDestructionChecks(); // 2D canvas is allowe d to leave context in an unfinalized state. 514 m_imageBuffer->context()->disableDestructionChecks(); // 2D canvas is allowe d to leave context in an unfinalized state.
515 #endif 515 #endif
516 m_contextStateSaver = adoptPtr(new GraphicsContextStateSaver(*m_imageBuffer- >context())); 516 m_contextStateSaver = adoptPtr(new GraphicsContextStateSaver(*m_imageBuffer- >context()));
517 517
518 if (m_context) 518 if (m_context)
519 setNeedsCompositingUpdate(); 519 setNeedsCompositingUpdate();
520 } 520 }
521 521
522 void HTMLCanvasElement::notifySurfaceInvalid() 522 void HTMLCanvasElement::notifySurfaceInvalid()
523 { 523 {
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 { 692 {
693 return !originClean(); 693 return !originClean();
694 } 694 }
695 695
696 FloatSize HTMLCanvasElement::sourceSize() const 696 FloatSize HTMLCanvasElement::sourceSize() const
697 { 697 {
698 return FloatSize(width(), height()); 698 return FloatSize(width(), height());
699 } 699 }
700 700
701 } 701 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698