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

Side by Side Diff: cc/CCTiledLayerImpl.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/CCTiledLayerImpl.h ('k') | cc/CCVideoLayerImpl.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 8
9 #include "CCTiledLayerImpl.h" 9 #include "CCTiledLayerImpl.h"
10 10
11 #include "base/stringprintf.h"
11 #include "CCAppendQuadsData.h" 12 #include "CCAppendQuadsData.h"
12 #include "CCCheckerboardDrawQuad.h" 13 #include "CCCheckerboardDrawQuad.h"
13 #include "CCDebugBorderDrawQuad.h" 14 #include "CCDebugBorderDrawQuad.h"
14 #include "CCLayerTilingData.h" 15 #include "CCLayerTilingData.h"
15 #include "CCMathUtil.h" 16 #include "CCMathUtil.h"
16 #include "CCQuadSink.h" 17 #include "CCQuadSink.h"
17 #include "CCSolidColorDrawQuad.h" 18 #include "CCSolidColorDrawQuad.h"
18 #include "CCTileDrawQuad.h" 19 #include "CCTileDrawQuad.h"
19 #include "FloatQuad.h" 20 #include "FloatQuad.h"
20 #include "GraphicsContext3D.h" 21 #include "GraphicsContext3D.h"
21 #include "SkColor.h" 22 #include "SkColor.h"
22 #include "TextStream.h"
23 #include <wtf/text/WTFString.h>
24 23
25 using namespace std; 24 using namespace std;
26 using WebKit::WebTransformationMatrix; 25 using WebKit::WebTransformationMatrix;
27 26
28 namespace WebCore { 27 namespace WebCore {
29 28
30 static const int debugTileBorderWidth = 1; 29 static const int debugTileBorderWidth = 1;
31 static const int debugTileBorderAlpha = 100; 30 static const int debugTileBorderAlpha = 100;
32 static const int debugTileBorderColorRed = 80; 31 static const int debugTileBorderColorRed = 80;
33 static const int debugTileBorderColorGreen = 200; 32 static const int debugTileBorderColorGreen = 200;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 ASSERT(m_tiler->numTilesX() == 1); 67 ASSERT(m_tiler->numTilesX() == 1);
69 ASSERT(m_tiler->numTilesY() == 1); 68 ASSERT(m_tiler->numTilesY() == 1);
70 69
71 DrawableTile* tile = tileAt(0, 0); 70 DrawableTile* tile = tileAt(0, 0);
72 CCResourceProvider::ResourceId resourceId = tile ? tile->resourceId() : 0; 71 CCResourceProvider::ResourceId resourceId = tile ? tile->resourceId() : 0;
73 ASSERT(resourceId); 72 ASSERT(resourceId);
74 73
75 return resourceId; 74 return resourceId;
76 } 75 }
77 76
78 void CCTiledLayerImpl::dumpLayerProperties(TextStream& ts, int indent) const 77 void CCTiledLayerImpl::dumpLayerProperties(std::string* str, int indent) const
79 { 78 {
80 CCLayerImpl::dumpLayerProperties(ts, indent); 79 str->append(indentString(indent));
81 writeIndent(ts, indent); 80 base::StringAppendF(str, "skipsDraw: %d\n", (!m_tiler || m_skipsDraw));
82 ts << "skipsDraw: " << (!m_tiler || m_skipsDraw) << "\n"; 81 CCLayerImpl::dumpLayerProperties(str, indent);
83 } 82 }
84 83
85 bool CCTiledLayerImpl::hasTileAt(int i, int j) const 84 bool CCTiledLayerImpl::hasTileAt(int i, int j) const
86 { 85 {
87 return m_tiler->tileAt(i, j); 86 return m_tiler->tileAt(i, j);
88 } 87 }
89 88
90 bool CCTiledLayerImpl::hasTextureIdForTileAt(int i, int j) const 89 bool CCTiledLayerImpl::hasTextureIdForTileAt(int i, int j) const
91 { 90 {
92 return hasTileAt(i, j) && tileAt(i, j)->resourceId(); 91 return hasTileAt(i, j) && tileAt(i, j)->resourceId();
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 210 }
212 211
213 void CCTiledLayerImpl::didLoseContext() 212 void CCTiledLayerImpl::didLoseContext()
214 { 213 {
215 m_tiler->reset(); 214 m_tiler->reset();
216 } 215 }
217 216
218 } // namespace WebCore 217 } // namespace WebCore
219 218
220 #endif // USE(ACCELERATED_COMPOSITING) 219 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « cc/CCTiledLayerImpl.h ('k') | cc/CCVideoLayerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698