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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 704
705 m_isHidden = newHiddenValue; 705 m_isHidden = newHiddenValue;
706 if (CANVAS2D_HIBERNATION_ENABLED && m_surface && isHidden() && 706 if (CANVAS2D_HIBERNATION_ENABLED && m_surface && isHidden() &&
707 !m_destructionInProgress && !m_hibernationScheduled) { 707 !m_destructionInProgress && !m_hibernationScheduled) {
708 if (m_layer) 708 if (m_layer)
709 m_layer->clearTexture(); 709 m_layer->clearTexture();
710 m_logger->reportHibernationEvent(HibernationScheduled); 710 m_logger->reportHibernationEvent(HibernationScheduled);
711 m_hibernationScheduled = true; 711 m_hibernationScheduled = true;
712 if (m_dontUseIdleSchedulingForTesting) { 712 if (m_dontUseIdleSchedulingForTesting) {
713 Platform::current()->currentThread()->getWebTaskRunner()->postTask( 713 Platform::current()->currentThread()->getWebTaskRunner()->postTask(
714 BLINK_FROM_HERE, WTF::bind(&hibernateWrapperForTesting, 714 BLINK_FROM_HERE,
715 m_weakPtrFactory.createWeakPtr())); 715 WTF::bind(&hibernateWrapperForTesting,
716 m_weakPtrFactory.createWeakPtr()));
716 } else { 717 } else {
717 Platform::current()->currentThread()->scheduler()->postIdleTask( 718 Platform::current()->currentThread()->scheduler()->postIdleTask(
718 BLINK_FROM_HERE, 719 BLINK_FROM_HERE,
719 WTF::bind(&hibernateWrapper, m_weakPtrFactory.createWeakPtr())); 720 WTF::bind(&hibernateWrapper, m_weakPtrFactory.createWeakPtr()));
720 } 721 }
721 } 722 }
722 if (!isHidden() && m_softwareRenderingWhileHidden) { 723 if (!isHidden() && m_softwareRenderingWhileHidden) {
723 flushRecordingOnly(); 724 flushRecordingOnly();
724 PaintFlags copyPaint; 725 PaintFlags copyPaint;
725 copyPaint.setBlendMode(SkBlendMode::kSrc); 726 copyPaint.setBlendMode(SkBlendMode::kSrc);
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 default; 1136 default;
1136 1137
1137 void Canvas2DLayerBridge::Logger::reportHibernationEvent( 1138 void Canvas2DLayerBridge::Logger::reportHibernationEvent(
1138 HibernationEvent event) { 1139 HibernationEvent event) {
1139 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, 1140 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram,
1140 ("Canvas.HibernationEvents", HibernationEventCount)); 1141 ("Canvas.HibernationEvents", HibernationEventCount));
1141 hibernationHistogram.count(event); 1142 hibernationHistogram.count(event);
1142 } 1143 }
1143 1144
1144 } // namespace blink 1145 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698