| 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 "cc/heads_up_display_layer_impl.h" | 7 #include "cc/heads_up_display_layer_impl.h" |
| 8 | 8 |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "cc/debug_rect_history.h" | 10 #include "cc/debug_rect_history.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void HeadsUpDisplayLayerImpl::setShowFPSCounter(bool show) | 62 void HeadsUpDisplayLayerImpl::setShowFPSCounter(bool show) |
| 63 { | 63 { |
| 64 m_showFPSCounter = show; | 64 m_showFPSCounter = show; |
| 65 } | 65 } |
| 66 | 66 |
| 67 void HeadsUpDisplayLayerImpl::willDraw(ResourceProvider* resourceProvider) | 67 void HeadsUpDisplayLayerImpl::willDraw(ResourceProvider* resourceProvider) |
| 68 { | 68 { |
| 69 LayerImpl::willDraw(resourceProvider); | 69 LayerImpl::willDraw(resourceProvider); |
| 70 | 70 |
| 71 if (!m_hudTexture) | 71 if (!m_hudTexture) |
| 72 m_hudTexture = ScopedTexture::create(resourceProvider); | 72 m_hudTexture = ScopedResource::create(resourceProvider); |
| 73 | 73 |
| 74 // FIXME: Scale the HUD by deviceScale to make it more friendly under high D
PI. | 74 // FIXME: Scale the HUD by deviceScale to make it more friendly under high D
PI. |
| 75 | 75 |
| 76 if (m_hudTexture->size() != bounds()) | 76 if (m_hudTexture->size() != bounds()) |
| 77 m_hudTexture->free(); | 77 m_hudTexture->free(); |
| 78 | 78 |
| 79 if (!m_hudTexture->id()) | 79 if (!m_hudTexture->id()) |
| 80 m_hudTexture->allocate(Renderer::ImplPool, bounds(), GL_RGBA, ResourcePr
ovider::TextureUsageAny); | 80 m_hudTexture->allocate(Renderer::ImplPool, bounds(), GL_RGBA, ResourcePr
ovider::TextureUsageAny); |
| 81 } | 81 } |
| 82 | 82 |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 canvas->drawRect(skRect, paint); | 321 canvas->drawRect(skRect, paint); |
| 322 } | 322 } |
| 323 } | 323 } |
| 324 | 324 |
| 325 const char* HeadsUpDisplayLayerImpl::layerTypeAsString() const | 325 const char* HeadsUpDisplayLayerImpl::layerTypeAsString() const |
| 326 { | 326 { |
| 327 return "HeadsUpDisplayLayer"; | 327 return "HeadsUpDisplayLayer"; |
| 328 } | 328 } |
| 329 | 329 |
| 330 } // namespace cc | 330 } // namespace cc |
| OLD | NEW |