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

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

Issue 327323002: Start removing the double-negative !ASSERT_DISABLED (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/core/frame/SuspendableTimer.cpp ('k') | Source/core/html/HTMLFormElement.cpp » ('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) 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 m_imageBuffer->context()->setImageInterpolationQuality(CanvasDefaultInterpol ationQuality); 510 m_imageBuffer->context()->setImageInterpolationQuality(CanvasDefaultInterpol ationQuality);
511 // Enabling MSAA overrides a request to disable antialiasing. This is true r egardless of whether the 511 // Enabling MSAA overrides a request to disable antialiasing. This is true r egardless of whether the
512 // rendering mode is accelerated or not. For consistency, we don't want to a pply AA in accelerated 512 // rendering mode is accelerated or not. For consistency, we don't want to a pply AA in accelerated
513 // canvases but not in unaccelerated canvases. 513 // canvases but not in unaccelerated canvases.
514 if (!msaaSampleCount && document().settings() && !document().settings()->ant ialiased2dCanvasEnabled()) 514 if (!msaaSampleCount && document().settings() && !document().settings()->ant ialiased2dCanvasEnabled())
515 m_imageBuffer->context()->setShouldAntialias(false); 515 m_imageBuffer->context()->setShouldAntialias(false);
516 // GraphicsContext's defaults don't always agree with the 2d canvas spec. 516 // GraphicsContext's defaults don't always agree with the 2d canvas spec.
517 // See CanvasRenderingContext2D::State::State() for more information. 517 // See CanvasRenderingContext2D::State::State() for more information.
518 m_imageBuffer->context()->setMiterLimit(10); 518 m_imageBuffer->context()->setMiterLimit(10);
519 m_imageBuffer->context()->setStrokeThickness(1); 519 m_imageBuffer->context()->setStrokeThickness(1);
520 #if !ASSERT_DISABLED 520 #if ASSERT_ENABLED
521 m_imageBuffer->context()->disableDestructionChecks(); // 2D canvas is allowe d to leave context in an unfinalized state. 521 m_imageBuffer->context()->disableDestructionChecks(); // 2D canvas is allowe d to leave context in an unfinalized state.
522 #endif 522 #endif
523 m_contextStateSaver = adoptPtr(new GraphicsContextStateSaver(*m_imageBuffer- >context())); 523 m_contextStateSaver = adoptPtr(new GraphicsContextStateSaver(*m_imageBuffer- >context()));
524 524
525 if (m_context) 525 if (m_context)
526 setNeedsCompositingUpdate(); 526 setNeedsCompositingUpdate();
527 } 527 }
528 528
529 void HTMLCanvasElement::notifySurfaceInvalid() 529 void HTMLCanvasElement::notifySurfaceInvalid()
530 { 530 {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 { 698 {
699 return !originClean(); 699 return !originClean();
700 } 700 }
701 701
702 FloatSize HTMLCanvasElement::sourceSize() const 702 FloatSize HTMLCanvasElement::sourceSize() const
703 { 703 {
704 return FloatSize(width(), height()); 704 return FloatSize(width(), height());
705 } 705 }
706 706
707 } 707 }
OLDNEW
« no previous file with comments | « Source/core/frame/SuspendableTimer.cpp ('k') | Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698