| OLD | NEW |
| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 { | 73 { |
| 74 if (!m_hudTexture->id()) | 74 if (!m_hudTexture->id()) |
| 75 return; | 75 return; |
| 76 | 76 |
| 77 CCSharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createShare
dQuadState()); | 77 CCSharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createShare
dQuadState()); |
| 78 | 78 |
| 79 IntRect quadRect(IntPoint(), bounds()); | 79 IntRect quadRect(IntPoint(), bounds()); |
| 80 bool premultipliedAlpha = true; | 80 bool premultipliedAlpha = true; |
| 81 FloatRect uvRect(0, 0, 1, 1); | 81 FloatRect uvRect(0, 0, 1, 1); |
| 82 bool flipped = false; | 82 bool flipped = false; |
| 83 quadSink.append(CCTextureDrawQuad::create(sharedQuadState, quadRect, m_hudTe
xture->id(), premultipliedAlpha, uvRect, flipped), appendQuadsData); | 83 quadSink.append(CCTextureDrawQuad::create(sharedQuadState, quadRect, m_hudTe
xture->id(), premultipliedAlpha, uvRect, flipped).PassAs<CCDrawQuad>(), appendQu
adsData); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void CCHeadsUpDisplayLayerImpl::updateHudTexture(CCResourceProvider* resourcePro
vider) | 86 void CCHeadsUpDisplayLayerImpl::updateHudTexture(CCResourceProvider* resourcePro
vider) |
| 87 { | 87 { |
| 88 if (!m_hudTexture->id()) | 88 if (!m_hudTexture->id()) |
| 89 return; | 89 return; |
| 90 | 90 |
| 91 SkISize canvasSize; | 91 SkISize canvasSize; |
| 92 if (m_hudCanvas) | 92 if (m_hudCanvas) |
| 93 canvasSize = m_hudCanvas->getDeviceSize(); | 93 canvasSize = m_hudCanvas->getDeviceSize(); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 canvas->drawRect(skRect, paint); | 286 canvas->drawRect(skRect, paint); |
| 287 } | 287 } |
| 288 } | 288 } |
| 289 | 289 |
| 290 const char* CCHeadsUpDisplayLayerImpl::layerTypeAsString() const | 290 const char* CCHeadsUpDisplayLayerImpl::layerTypeAsString() const |
| 291 { | 291 { |
| 292 return "HeadsUpDisplayLayer"; | 292 return "HeadsUpDisplayLayer"; |
| 293 } | 293 } |
| 294 | 294 |
| 295 } | 295 } |
| OLD | NEW |