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

Side by Side Diff: cc/LayerChromium.cpp

Issue 10900021: Use std::string instead of WTF::String / TextStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/LayerChromium.h ('k') | cc/ProgramBinding.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #if USE(ACCELERATED_COMPOSITING) 7 #if USE(ACCELERATED_COMPOSITING)
8 #include "LayerChromium.h" 8 #include "LayerChromium.h"
9 9
10 #include "CCActiveAnimation.h" 10 #include "CCActiveAnimation.h"
11 #include "CCAnimationEvents.h" 11 #include "CCAnimationEvents.h"
12 #include "CCLayerAnimationController.h" 12 #include "CCLayerAnimationController.h"
13 #include "CCLayerImpl.h" 13 #include "CCLayerImpl.h"
14 #include "CCLayerTreeHost.h" 14 #include "CCLayerTreeHost.h"
15 #include "CCSettings.h" 15 #include "CCSettings.h"
16 #include "TextStream.h"
17
18 #include <public/WebAnimationDelegate.h> 16 #include <public/WebAnimationDelegate.h>
19 #include <public/WebLayerScrollClient.h> 17 #include <public/WebLayerScrollClient.h>
20 #include <public/WebSize.h> 18 #include <public/WebSize.h>
21 19
22 using namespace std; 20 using namespace std;
23 using WebKit::WebTransformationMatrix; 21 using WebKit::WebTransformationMatrix;
24 22
25 namespace WebCore { 23 namespace WebCore {
26 24
27 static int s_nextLayerId = 1; 25 static int s_nextLayerId = 1;
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 500
503 void LayerChromium::pushPropertiesTo(CCLayerImpl* layer) 501 void LayerChromium::pushPropertiesTo(CCLayerImpl* layer)
504 { 502 {
505 layer->setAnchorPoint(m_anchorPoint); 503 layer->setAnchorPoint(m_anchorPoint);
506 layer->setAnchorPointZ(m_anchorPointZ); 504 layer->setAnchorPointZ(m_anchorPointZ);
507 layer->setBackgroundColor(m_backgroundColor); 505 layer->setBackgroundColor(m_backgroundColor);
508 layer->setBounds(m_bounds); 506 layer->setBounds(m_bounds);
509 layer->setContentBounds(contentBounds()); 507 layer->setContentBounds(contentBounds());
510 layer->setDebugBorderColor(m_debugBorderColor); 508 layer->setDebugBorderColor(m_debugBorderColor);
511 layer->setDebugBorderWidth(m_debugBorderWidth); 509 layer->setDebugBorderWidth(m_debugBorderWidth);
512 layer->setDebugName(m_debugName.isolatedCopy()); // We have to use isolatedC opy() here to safely pass ownership to another thread. 510 layer->setDebugName(m_debugName);
513 layer->setDoubleSided(m_doubleSided); 511 layer->setDoubleSided(m_doubleSided);
514 layer->setDrawCheckerboardForMissingTiles(m_drawCheckerboardForMissingTiles) ; 512 layer->setDrawCheckerboardForMissingTiles(m_drawCheckerboardForMissingTiles) ;
515 layer->setForceRenderSurface(m_forceRenderSurface); 513 layer->setForceRenderSurface(m_forceRenderSurface);
516 layer->setDrawsContent(drawsContent()); 514 layer->setDrawsContent(drawsContent());
517 layer->setFilters(filters()); 515 layer->setFilters(filters());
518 layer->setBackgroundFilters(backgroundFilters()); 516 layer->setBackgroundFilters(backgroundFilters());
519 layer->setUseLCDText(m_useLCDText); 517 layer->setUseLCDText(m_useLCDText);
520 layer->setMasksToBounds(m_masksToBounds); 518 layer->setMasksToBounds(m_masksToBounds);
521 layer->setScrollable(m_scrollable); 519 layer->setScrollable(m_scrollable);
522 layer->setShouldScrollOnMainThread(m_shouldScrollOnMainThread); 520 layer->setShouldScrollOnMainThread(m_shouldScrollOnMainThread);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 m_debugBorderColor = color; 572 m_debugBorderColor = color;
575 setNeedsCommit(); 573 setNeedsCommit();
576 } 574 }
577 575
578 void LayerChromium::setDebugBorderWidth(float width) 576 void LayerChromium::setDebugBorderWidth(float width)
579 { 577 {
580 m_debugBorderWidth = width; 578 m_debugBorderWidth = width;
581 setNeedsCommit(); 579 setNeedsCommit();
582 } 580 }
583 581
584 void LayerChromium::setDebugName(const String& debugName) 582 void LayerChromium::setDebugName(const std::string& debugName)
585 { 583 {
586 m_debugName = debugName; 584 m_debugName = debugName;
587 setNeedsCommit(); 585 setNeedsCommit();
588 } 586 }
589 587
590 void LayerChromium::setContentsScale(float contentsScale) 588 void LayerChromium::setContentsScale(float contentsScale)
591 { 589 {
592 if (!needsContentsScale() || m_contentsScale == contentsScale) 590 if (!needsContentsScale() || m_contentsScale == contentsScale)
593 return; 591 return;
594 m_contentsScale = contentsScale; 592 m_contentsScale = contentsScale;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 return Region(); 714 return Region();
717 } 715 }
718 716
719 void sortLayers(Vector<RefPtr<LayerChromium> >::iterator, Vector<RefPtr<LayerChr omium> >::iterator, void*) 717 void sortLayers(Vector<RefPtr<LayerChromium> >::iterator, Vector<RefPtr<LayerChr omium> >::iterator, void*)
720 { 718 {
721 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort LayerChromiums. 719 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort LayerChromiums.
722 } 720 }
723 721
724 } 722 }
725 #endif // USE(ACCELERATED_COMPOSITING) 723 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « cc/LayerChromium.h ('k') | cc/ProgramBinding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698