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

Unified Diff: cc/texture_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/texture_layer_impl.h ('k') | cc/video_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/texture_layer_impl.cc
diff --git a/cc/texture_layer_impl.cc b/cc/texture_layer_impl.cc
index b94fe1363d1c49e77447bc7f218c55e02b7dc89b..d1a48dad3f0d747e2270bb69f0e27953dbb14acd 100644
--- a/cc/texture_layer_impl.cc
+++ b/cc/texture_layer_impl.cc
@@ -18,7 +18,8 @@ TextureLayerImpl::TextureLayerImpl(LayerTreeImpl* treeImpl, int id, bool usesMai
, m_externalTextureResource(0)
, m_premultipliedAlpha(true)
, m_flipped(true)
- , m_uvRect(0, 0, 1, 1)
+ , m_uvTopLeft(0.f, 0.f)
+ , m_uvBottomRight(1.f, 1.f)
, m_hasPendingMailbox(false)
, m_usesMailbox(usesMailbox)
{
@@ -87,7 +88,7 @@ void TextureLayerImpl::appendQuads(QuadSink& quadSink, AppendQuadsData& appendQu
gfx::Rect quadRect(gfx::Point(), contentBounds());
gfx::Rect opaqueRect(contentsOpaque() ? quadRect : gfx::Rect());
scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create();
- quad->SetNew(sharedQuadState, quadRect, opaqueRect, m_externalTextureResource, m_premultipliedAlpha, m_uvRect, m_vertexOpacity, m_flipped);
+ quad->SetNew(sharedQuadState, quadRect, opaqueRect, m_externalTextureResource, m_premultipliedAlpha, m_uvTopLeft, m_uvBottomRight, m_vertexOpacity, m_flipped);
// Perform explicit clipping on a quad to avoid setting a scissor later.
if (sharedQuadState->is_clipped && quad->PerformClipping())
« no previous file with comments | « cc/texture_layer_impl.h ('k') | cc/video_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698