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

Unified Diff: cc/heads_up_display_layer_impl.cc

Issue 11783094: cc: Add point-based UV coordinate on TextureLayer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/gl_renderer.cc ('k') | cc/nine_patch_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/heads_up_display_layer_impl.cc
diff --git a/cc/heads_up_display_layer_impl.cc b/cc/heads_up_display_layer_impl.cc
index 190229667783378229e0a45590080b10a1e87b2a..5dbe3283b652c73fbfaa99bbbae5f5537f79c46a 100644
--- a/cc/heads_up_display_layer_impl.cc
+++ b/cc/heads_up_display_layer_impl.cc
@@ -98,11 +98,12 @@ void HeadsUpDisplayLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& a
gfx::Rect quadRect(gfx::Point(), bounds());
gfx::Rect opaqueRect(contentsOpaque() ? quadRect : gfx::Rect());
bool premultipliedAlpha = true;
- gfx::RectF uvRect(0, 0, 1, 1);
- const float vertex_opacity[] = {1.0f, 1.0f, 1.0f, 1.0f};
+ gfx::PointF uv_top_left(0.f, 0.f);
+ gfx::PointF uv_bottom_right(1.f, 1.f);
+ const float vertex_opacity[] = {1.f, 1.f, 1.f, 1.f};
bool flipped = false;
scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create();
- quad->SetNew(sharedQuadState, quadRect, opaqueRect, m_hudTexture->id(), premultipliedAlpha, uvRect, vertex_opacity, flipped);
+ quad->SetNew(sharedQuadState, quadRect, opaqueRect, m_hudTexture->id(), premultipliedAlpha, uv_top_left, uv_bottom_right, vertex_opacity, flipped);
quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData);
}
« no previous file with comments | « cc/gl_renderer.cc ('k') | cc/nine_patch_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698