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

Side by Side Diff: cc/heads_up_display_layer_impl.cc

Issue 11412022: Switched cc::Resource and cc::ScopedResource to Chrome coding style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit tests. Created 8 years, 1 month 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/gl_renderer.cc ('k') | cc/layer_tree_host.cc » ('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 "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_rect_history.h" 10 #include "cc/debug_rect_history.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void HeadsUpDisplayLayerImpl::willDraw(ResourceProvider* resourceProvider) 69 void HeadsUpDisplayLayerImpl::willDraw(ResourceProvider* resourceProvider)
70 { 70 {
71 LayerImpl::willDraw(resourceProvider); 71 LayerImpl::willDraw(resourceProvider);
72 72
73 if (!m_hudTexture) 73 if (!m_hudTexture)
74 m_hudTexture = ScopedResource::create(resourceProvider); 74 m_hudTexture = ScopedResource::create(resourceProvider);
75 75
76 // FIXME: Scale the HUD by deviceScale to make it more friendly under high D PI. 76 // FIXME: Scale the HUD by deviceScale to make it more friendly under high D PI.
77 77
78 if (m_hudTexture->size() != bounds()) 78 if (m_hudTexture->size() != bounds())
79 m_hudTexture->free(); 79 m_hudTexture->Free();
80 80
81 if (!m_hudTexture->id()) 81 if (!m_hudTexture->id())
82 m_hudTexture->allocate(Renderer::ImplPool, bounds(), GL_RGBA, ResourcePr ovider::TextureUsageAny); 82 m_hudTexture->Allocate(Renderer::ImplPool, bounds(), GL_RGBA, ResourcePr ovider::TextureUsageAny);
83 } 83 }
84 84
85 void HeadsUpDisplayLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& a ppendQuadsData) 85 void HeadsUpDisplayLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& a ppendQuadsData)
86 { 86 {
87 if (!m_hudTexture->id()) 87 if (!m_hudTexture->id())
88 return; 88 return;
89 89
90 SharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQ uadState()); 90 SharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQ uadState());
91 91
92 gfx::Rect quadRect(gfx::Point(), bounds()); 92 gfx::Rect quadRect(gfx::Point(), bounds());
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 canvas->drawRect(skRect, paint); 368 canvas->drawRect(skRect, paint);
369 } 369 }
370 } 370 }
371 371
372 const char* HeadsUpDisplayLayerImpl::layerTypeAsString() const 372 const char* HeadsUpDisplayLayerImpl::layerTypeAsString() const
373 { 373 {
374 return "HeadsUpDisplayLayer"; 374 return "HeadsUpDisplayLayer";
375 } 375 }
376 376
377 } // namespace cc 377 } // namespace cc
OLDNEW
« no previous file with comments | « cc/gl_renderer.cc ('k') | cc/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698