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

Side by Side Diff: cc/heads_up_display_layer_impl.cc

Issue 11412044: cc: Remove opaque flags from SharedQuadState and DrawQuad (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/draw_quad_unittest.cc ('k') | cc/io_surface_draw_quad.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 "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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 85
86 void HeadsUpDisplayLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& a ppendQuadsData) 86 void HeadsUpDisplayLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& a ppendQuadsData)
87 { 87 {
88 if (!m_hudTexture->id()) 88 if (!m_hudTexture->id())
89 return; 89 return;
90 90
91 SharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQ uadState()); 91 SharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createSharedQ uadState());
92 92
93 gfx::Rect quadRect(gfx::Point(), bounds()); 93 gfx::Rect quadRect(gfx::Point(), bounds());
94 gfx::Rect opaqueRect(contentsOpaque() ? quadRect : gfx::Rect());
94 bool premultipliedAlpha = true; 95 bool premultipliedAlpha = true;
95 gfx::RectF uvRect(0, 0, 1, 1); 96 gfx::RectF uvRect(0, 0, 1, 1);
96 bool flipped = false; 97 bool flipped = false;
97 quadSink.append(TextureDrawQuad::create(sharedQuadState, quadRect, m_hudText ure->id(), premultipliedAlpha, uvRect, flipped).PassAs<DrawQuad>(), appendQuadsD ata); 98 quadSink.append(TextureDrawQuad::create(sharedQuadState, quadRect, opaqueRec t, m_hudTexture->id(), premultipliedAlpha, uvRect, flipped).PassAs<DrawQuad>(), appendQuadsData);
98 } 99 }
99 100
100 void HeadsUpDisplayLayerImpl::updateHudTexture(ResourceProvider* resourceProvide r) 101 void HeadsUpDisplayLayerImpl::updateHudTexture(ResourceProvider* resourceProvide r)
101 { 102 {
102 if (!m_hudTexture->id()) 103 if (!m_hudTexture->id())
103 return; 104 return;
104 105
105 SkISize canvasSize; 106 SkISize canvasSize;
106 if (m_hudCanvas) 107 if (m_hudCanvas)
107 canvasSize = m_hudCanvas->getDeviceSize(); 108 canvasSize = m_hudCanvas->getDeviceSize();
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 canvas->drawRect(skRect, paint); 371 canvas->drawRect(skRect, paint);
371 } 372 }
372 } 373 }
373 374
374 const char* HeadsUpDisplayLayerImpl::layerTypeAsString() const 375 const char* HeadsUpDisplayLayerImpl::layerTypeAsString() const
375 { 376 {
376 return "HeadsUpDisplayLayer"; 377 return "HeadsUpDisplayLayer";
377 } 378 }
378 379
379 } // namespace cc 380 } // namespace cc
OLDNEW
« no previous file with comments | « cc/draw_quad_unittest.cc ('k') | cc/io_surface_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698