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

Side by Side Diff: cc/CCHeadsUpDisplayLayerImpl.cpp

Issue 10947047: Fix remaining cc files to compile with Clang (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix FakeCCDelayBasedTimeSource 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/CCHeadsUpDisplayLayerImpl.h ('k') | cc/CCLayerImpl.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #include "CCHeadsUpDisplayLayerImpl.h" 7 #include "CCHeadsUpDisplayLayerImpl.h"
8 8
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "CCDebugRectHistory.h" 10 #include "CCDebugRectHistory.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // parent compositor. We will probably need to hold on to m_hudTexture for 119 // parent compositor. We will probably need to hold on to m_hudTexture for
120 // longer, and have several HUD textures in the pipeline. 120 // longer, and have several HUD textures in the pipeline.
121 ASSERT(!resourceProvider->inUseByConsumer(m_hudTexture->id())); 121 ASSERT(!resourceProvider->inUseByConsumer(m_hudTexture->id()));
122 } 122 }
123 123
124 void CCHeadsUpDisplayLayerImpl::didLoseContext() 124 void CCHeadsUpDisplayLayerImpl::didLoseContext()
125 { 125 {
126 m_hudTexture.clear(); 126 m_hudTexture.clear();
127 } 127 }
128 128
129 bool CCHeadsUpDisplayLayerImpl::layerIsAlwaysDamaged() const
130 {
131 return true;
132 }
133
129 void CCHeadsUpDisplayLayerImpl::drawHudContents(SkCanvas* canvas) 134 void CCHeadsUpDisplayLayerImpl::drawHudContents(SkCanvas* canvas)
130 { 135 {
131 const CCLayerTreeSettings& settings = layerTreeHostImpl()->settings(); 136 const CCLayerTreeSettings& settings = layerTreeHostImpl()->settings();
132 137
133 if (settings.showPlatformLayerTree) { 138 if (settings.showPlatformLayerTree) {
134 SkPaint paint = createPaint(); 139 SkPaint paint = createPaint();
135 paint.setColor(SkColorSetARGB(192, 0, 0, 0)); 140 paint.setColor(SkColorSetARGB(192, 0, 0, 0));
136 canvas->drawRect(SkRect::MakeXYWH(0, 0, bounds().width(), bounds().heigh t()), paint); 141 canvas->drawRect(SkRect::MakeXYWH(0, 0, bounds().width(), bounds().heigh t()), paint);
137 } 142 }
138 143
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 paint.setColor(fillColor); 280 paint.setColor(fillColor);
276 canvas->drawRect(skRect, paint); 281 canvas->drawRect(skRect, paint);
277 282
278 paint.setColor(strokeColor); 283 paint.setColor(strokeColor);
279 paint.setStyle(SkPaint::kStroke_Style); 284 paint.setStyle(SkPaint::kStroke_Style);
280 paint.setStrokeWidth(2); 285 paint.setStrokeWidth(2);
281 canvas->drawRect(skRect, paint); 286 canvas->drawRect(skRect, paint);
282 } 287 }
283 } 288 }
284 289
290 const char* CCHeadsUpDisplayLayerImpl::layerTypeAsString() const
291 {
292 return "HeadsUpDisplayLayer";
285 } 293 }
294
295 }
OLDNEW
« no previous file with comments | « cc/CCHeadsUpDisplayLayerImpl.h ('k') | cc/CCLayerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698