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

Side by Side Diff: cc/CCHeadsUpDisplayLayerImpl.cpp

Issue 10915298: Add CCDelegatingRenderer, and corresponding IPCs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang Created 8 years, 2 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/CCFrameRateController.cpp ('k') | cc/CCLayerTreeHost.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 "ui/gfx/point.h" 10 #include "ui/gfx/point.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 void CCHeadsUpDisplayLayerImpl::willDraw(CCResourceProvider* resourceProvider) 57 void CCHeadsUpDisplayLayerImpl::willDraw(CCResourceProvider* resourceProvider)
58 { 58 {
59 CCLayerImpl::willDraw(resourceProvider); 59 CCLayerImpl::willDraw(resourceProvider);
60 60
61 if (!m_hudTexture) 61 if (!m_hudTexture)
62 m_hudTexture = CCScopedTexture::create(resourceProvider); 62 m_hudTexture = CCScopedTexture::create(resourceProvider);
63 63
64 // FIXME: Scale the HUD by deviceScale to make it more friendly under high D PI. 64 // FIXME: Scale the HUD by deviceScale to make it more friendly under high D PI.
65 65
66 if (m_hudTexture->size() != bounds()) 66 //if (m_hudTexture->size() != bounds())
67 m_hudTexture->free(); 67 m_hudTexture->free();
68 68
69 if (!m_hudTexture->id()) 69 if (!m_hudTexture->id())
70 m_hudTexture->allocate(CCRenderer::ImplPool, bounds(), GraphicsContext3D ::RGBA, CCResourceProvider::TextureUsageAny); 70 m_hudTexture->allocate(CCRenderer::ImplPool, bounds(), GraphicsContext3D ::RGBA, CCResourceProvider::TextureUsageAny);
71 } 71 }
72 72
73 void CCHeadsUpDisplayLayerImpl::appendQuads(CCQuadSink& quadSink, CCAppendQuadsD ata& appendQuadsData) 73 void CCHeadsUpDisplayLayerImpl::appendQuads(CCQuadSink& quadSink, CCAppendQuadsD ata& appendQuadsData)
74 { 74 {
75 if (!m_hudTexture->id()) 75 if (!m_hudTexture->id())
76 return; 76 return;
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 canvas->drawRect(skRect, paint); 287 canvas->drawRect(skRect, paint);
288 } 288 }
289 } 289 }
290 290
291 const char* CCHeadsUpDisplayLayerImpl::layerTypeAsString() const 291 const char* CCHeadsUpDisplayLayerImpl::layerTypeAsString() const
292 { 292 {
293 return "HeadsUpDisplayLayer"; 293 return "HeadsUpDisplayLayer";
294 } 294 }
295 295
296 } 296 }
OLDNEW
« no previous file with comments | « cc/CCFrameRateController.cpp ('k') | cc/CCLayerTreeHost.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698