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

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

Issue 2291723002: Manually rename \<m_[0-9]... fields to help rewrite_to_chrome_style tool. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GraphicsLayer.h ('k') | no next file » | 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip) 132 , m_paintingPhase(GraphicsLayerPaintAllWithOverflowClip)
133 , m_parent(0) 133 , m_parent(0)
134 , m_maskLayer(0) 134 , m_maskLayer(0)
135 , m_contentsClippingMaskLayer(0) 135 , m_contentsClippingMaskLayer(0)
136 , m_replicaLayer(0) 136 , m_replicaLayer(0)
137 , m_replicatedLayer(0) 137 , m_replicatedLayer(0)
138 , m_paintCount(0) 138 , m_paintCount(0)
139 , m_contentsLayer(0) 139 , m_contentsLayer(0)
140 , m_contentsLayerId(0) 140 , m_contentsLayerId(0)
141 , m_scrollableArea(nullptr) 141 , m_scrollableArea(nullptr)
142 , m_3dRenderingContext(0) 142 , m_renderingContext3d(0)
143 { 143 {
144 #if ENABLE(ASSERT) 144 #if ENABLE(ASSERT)
145 if (m_client) 145 if (m_client)
146 m_client->verifyNotPainting(); 146 m_client->verifyNotPainting();
147 #endif 147 #endif
148 148
149 m_contentLayerDelegate = wrapUnique(new ContentLayerDelegate(this)); 149 m_contentLayerDelegate = wrapUnique(new ContentLayerDelegate(this));
150 m_layer = wrapUnique(Platform::current()->compositorSupport()->createContent Layer(m_contentLayerDelegate.get())); 150 m_layer = wrapUnique(Platform::current()->compositorSupport()->createContent Layer(m_contentLayerDelegate.get()));
151 m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible); 151 m_layer->layer()->setDrawsContent(m_drawsContent && m_contentsVisible);
152 m_layer->layer()->setLayerClient(this); 152 m_layer->layer()->setLayerClient(this);
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 // It is necessary to call setDrawsContent as soon as we receive the new con tentsLayer, for 511 // It is necessary to call setDrawsContent as soon as we receive the new con tentsLayer, for
512 // the correctness of early exit conditions in setDrawsContent() and setCont entsVisible(). 512 // the correctness of early exit conditions in setDrawsContent() and setCont entsVisible().
513 m_contentsLayer->setDrawsContent(m_contentsVisible); 513 m_contentsLayer->setDrawsContent(m_contentsVisible);
514 514
515 // Insert the content layer first. Video elements require this, because they have 515 // Insert the content layer first. Video elements require this, because they have
516 // shadow content that must display in front of the video. 516 // shadow content that must display in front of the video.
517 m_layer->layer()->insertChild(m_contentsLayer, 0); 517 m_layer->layer()->insertChild(m_contentsLayer, 0);
518 WebLayer* borderWebLayer = m_contentsClippingMaskLayer ? m_contentsClippingM askLayer->platformLayer() : 0; 518 WebLayer* borderWebLayer = m_contentsClippingMaskLayer ? m_contentsClippingM askLayer->platformLayer() : 0;
519 m_contentsLayer->setMaskLayer(borderWebLayer); 519 m_contentsLayer->setMaskLayer(borderWebLayer);
520 520
521 m_contentsLayer->setRenderingContext(m_3dRenderingContext); 521 m_contentsLayer->setRenderingContext(m_renderingContext3d);
522 } 522 }
523 523
524 void GraphicsLayer::clearContentsLayerIfUnregistered() 524 void GraphicsLayer::clearContentsLayerIfUnregistered()
525 { 525 {
526 if (!m_contentsLayerId || s_registeredLayerSet->contains(m_contentsLayerId)) 526 if (!m_contentsLayerId || s_registeredLayerSet->contains(m_contentsLayerId))
527 return; 527 return;
528 528
529 m_contentsLayer = 0; 529 m_contentsLayer = 0;
530 m_contentsLayerId = 0; 530 m_contentsLayerId = 0;
531 } 531 }
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 720
721 if (m_isRootForIsolatedGroup) 721 if (m_isRootForIsolatedGroup)
722 json->setBoolean("isolate", m_isRootForIsolatedGroup); 722 json->setBoolean("isolate", m_isRootForIsolatedGroup);
723 723
724 if (m_contentsOpaque) 724 if (m_contentsOpaque)
725 json->setBoolean("contentsOpaque", m_contentsOpaque); 725 json->setBoolean("contentsOpaque", m_contentsOpaque);
726 726
727 if (!m_shouldFlattenTransform) 727 if (!m_shouldFlattenTransform)
728 json->setBoolean("shouldFlattenTransform", m_shouldFlattenTransform); 728 json->setBoolean("shouldFlattenTransform", m_shouldFlattenTransform);
729 729
730 if (m_3dRenderingContext) { 730 if (m_renderingContext3d) {
731 RenderingContextMap::const_iterator it = renderingContextMap.find(m_3dRe nderingContext); 731 RenderingContextMap::const_iterator it = renderingContextMap.find(m_rend eringContext3d);
732 int contextId = renderingContextMap.size() + 1; 732 int contextId = renderingContextMap.size() + 1;
733 if (it == renderingContextMap.end()) 733 if (it == renderingContextMap.end())
734 renderingContextMap.set(m_3dRenderingContext, contextId); 734 renderingContextMap.set(m_renderingContext3d, contextId);
735 else 735 else
736 contextId = it->value; 736 contextId = it->value;
737 737
738 json->setInteger("3dRenderingContext", contextId); 738 json->setInteger("3dRenderingContext", contextId);
739 } 739 }
740 740
741 if (m_drawsContent) 741 if (m_drawsContent)
742 json->setBoolean("drawsContent", m_drawsContent); 742 json->setBoolean("drawsContent", m_drawsContent);
743 743
744 if (!m_contentsVisible) 744 if (!m_contentsVisible)
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 if (shouldFlatten == m_shouldFlattenTransform) 941 if (shouldFlatten == m_shouldFlattenTransform)
942 return; 942 return;
943 943
944 m_shouldFlattenTransform = shouldFlatten; 944 m_shouldFlattenTransform = shouldFlatten;
945 945
946 m_layer->layer()->setShouldFlattenTransform(shouldFlatten); 946 m_layer->layer()->setShouldFlattenTransform(shouldFlatten);
947 } 947 }
948 948
949 void GraphicsLayer::setRenderingContext(int context) 949 void GraphicsLayer::setRenderingContext(int context)
950 { 950 {
951 if (m_3dRenderingContext == context) 951 if (m_renderingContext3d == context)
952 return; 952 return;
953 953
954 m_3dRenderingContext = context; 954 m_renderingContext3d = context;
955 m_layer->layer()->setRenderingContext(context); 955 m_layer->layer()->setRenderingContext(context);
956 956
957 if (m_contentsLayer) 957 if (m_contentsLayer)
958 m_contentsLayer->setRenderingContext(m_3dRenderingContext); 958 m_contentsLayer->setRenderingContext(m_renderingContext3d);
959 } 959 }
960 960
961 void GraphicsLayer::setMasksToBounds(bool masksToBounds) 961 void GraphicsLayer::setMasksToBounds(bool masksToBounds)
962 { 962 {
963 m_masksToBounds = masksToBounds; 963 m_masksToBounds = masksToBounds;
964 m_layer->layer()->setMasksToBounds(m_masksToBounds); 964 m_layer->layer()->setMasksToBounds(m_masksToBounds);
965 } 965 }
966 966
967 void GraphicsLayer::setDrawsContent(bool drawsContent) 967 void GraphicsLayer::setDrawsContent(bool drawsContent)
968 { 968 {
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 { 1350 {
1351 if (!layer) { 1351 if (!layer) {
1352 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n"); 1352 fprintf(stderr, "Cannot showGraphicsLayerTree for (nil).\n");
1353 return; 1353 return;
1354 } 1354 }
1355 1355
1356 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1356 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1357 fprintf(stderr, "%s\n", output.utf8().data()); 1357 fprintf(stderr, "%s\n", output.utf8().data());
1358 } 1358 }
1359 #endif 1359 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/GraphicsLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698