| 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 "cc/heads_up_display_layer_impl.h" | 5 #include "cc/heads_up_display_layer_impl.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "cc/debug_colors.h" | 10 #include "cc/debug_colors.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 { | 58 { |
| 59 } | 59 } |
| 60 | 60 |
| 61 void HeadsUpDisplayLayerImpl::setFontAtlas(scoped_ptr<FontAtlas> fontAtlas) | 61 void HeadsUpDisplayLayerImpl::setFontAtlas(scoped_ptr<FontAtlas> fontAtlas) |
| 62 { | 62 { |
| 63 m_fontAtlas = fontAtlas.Pass(); | 63 m_fontAtlas = fontAtlas.Pass(); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void HeadsUpDisplayLayerImpl::willDraw(ResourceProvider* resourceProvider) | 66 void HeadsUpDisplayLayerImpl::willDraw(ResourceProvider* resourceProvider) |
| 67 { | 67 { |
| 68 fprintf(stderr, "enne: willdraw hud layer\n"); |
| 68 LayerImpl::willDraw(resourceProvider); | 69 LayerImpl::willDraw(resourceProvider); |
| 69 | 70 |
| 70 if (!m_hudTexture) | 71 if (!m_hudTexture) |
| 71 m_hudTexture = ScopedResource::create(resourceProvider); | 72 m_hudTexture = ScopedResource::create(resourceProvider); |
| 72 | 73 |
| 73 // 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. |
| 74 | 75 |
| 75 if (m_hudTexture->size() != bounds()) | 76 if (m_hudTexture->size() != bounds()) |
| 76 m_hudTexture->Free(); | 77 m_hudTexture->Free(); |
| 77 | 78 |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 | 376 |
| 376 canvas->restore(); | 377 canvas->restore(); |
| 377 } | 378 } |
| 378 | 379 |
| 379 const char* HeadsUpDisplayLayerImpl::layerTypeAsString() const | 380 const char* HeadsUpDisplayLayerImpl::layerTypeAsString() const |
| 380 { | 381 { |
| 381 return "HeadsUpDisplayLayer"; | 382 return "HeadsUpDisplayLayer"; |
| 382 } | 383 } |
| 383 | 384 |
| 384 } // namespace cc | 385 } // namespace cc |
| OLD | NEW |