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

Unified Diff: ui/compositor/layer.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 | « content/renderer/browser_plugin/browser_plugin_compositing_helper.cc ('k') | ui/gfx/size_base_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 053ddac57be75b23212d07aab9cf973a03bf8142..119a1cfa868390103209691c432da434f32c665f 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -786,12 +786,11 @@ void Layer::RecomputeDrawsContentAndUVRect() {
gfx::Size size(std::min(bounds().width(), texture_size.width()),
std::min(bounds().height(), texture_size.height()));
- gfx::RectF rect(
- 0,
- 0,
+ gfx::PointF uv_top_left(0.f, 0.f);
+ gfx::PointF uv_bottom_right(
static_cast<float>(size.width())/texture_size.width(),
static_cast<float>(size.height())/texture_size.height());
- texture_layer_->setUVRect(rect);
+ texture_layer_->setUV(uv_top_left, uv_bottom_right);
cc_layer_->setBounds(ConvertSizeToPixel(this, size));
}
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin_compositing_helper.cc ('k') | ui/gfx/size_base_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698