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

Side by Side Diff: cc/CCHeadsUpDisplayLayerImpl.cpp

Issue 10898023: Update cc snapshot to WK r126941 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebased Created 8 years, 3 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
« no previous file with comments | « cc/CCHeadsUpDisplayLayerImpl.h ('k') | cc/CCIOSurfaceLayerImpl.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 "CCDebugRectHistory.h" 9 #include "CCDebugRectHistory.h"
10 #include "CCFontAtlas.h" 10 #include "CCFontAtlas.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // FIXME: Scale the HUD by deviceScale to make it more friendly under high D PI. 63 // FIXME: Scale the HUD by deviceScale to make it more friendly under high D PI.
64 64
65 if (m_hudTexture->size() != bounds()) 65 if (m_hudTexture->size() != bounds())
66 m_hudTexture->free(); 66 m_hudTexture->free();
67 67
68 if (!m_hudTexture->id()) 68 if (!m_hudTexture->id())
69 m_hudTexture->allocate(CCRenderer::ImplPool, bounds(), GraphicsContext3D ::RGBA, CCResourceProvider::TextureUsageAny); 69 m_hudTexture->allocate(CCRenderer::ImplPool, bounds(), GraphicsContext3D ::RGBA, CCResourceProvider::TextureUsageAny);
70 } 70 }
71 71
72 void CCHeadsUpDisplayLayerImpl::appendQuads(CCQuadSink& quadSink, bool&) 72 void CCHeadsUpDisplayLayerImpl::appendQuads(CCQuadSink& quadSink, CCAppendQuadsD ata& appendQuadsData)
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)); 83 quadSink.append(CCTextureDrawQuad::create(sharedQuadState, quadRect, m_hudTe xture->id(), premultipliedAlpha, uvRect, flipped), appendQuadsData);
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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 canvas->drawRect(skRect, paint); 276 canvas->drawRect(skRect, paint);
277 277
278 paint.setColor(strokeColor); 278 paint.setColor(strokeColor);
279 paint.setStyle(SkPaint::kStroke_Style); 279 paint.setStyle(SkPaint::kStroke_Style);
280 paint.setStrokeWidth(2); 280 paint.setStrokeWidth(2);
281 canvas->drawRect(skRect, paint); 281 canvas->drawRect(skRect, paint);
282 } 282 }
283 } 283 }
284 284
285 } 285 }
OLDNEW
« no previous file with comments | « cc/CCHeadsUpDisplayLayerImpl.h ('k') | cc/CCIOSurfaceLayerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698