From 3543975945a5667aa3fb48c6d0e1b6312d1ed293 Mon Sep 17 00:00:00 2001 From: "ilevy@chromium.org" Date: Thu, 17 Jan 2013 06:40:50 +0000 Subject: Revert 177288 > cc: Add point-based UV coordinate on TextureLayer > > Previously, the uv coordinates was using gfx::RectF as a struct. > This was limitating because it could not handle negative width > and heights. Soring them as 2 gfx::PointF for the Top-Left and > Bottom-Right points aleviate that restriction. > The current implementation of the phone UI rely on this feature. > > BUG=168927 > > Review URL: https://chromiumcodereview.appspot.com/11783094 This is breaking the android internal chrome build, we need green for a release cut later tonight. Let's reland tomorrow with the corresponding downstream fix. TBR=jscholler@chromium.org Review URL: https://codereview.chromium.org/11959026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177360 0039d316-1c4b-4281-b951-d872f2087c98 --- content/common/cc_messages.h | 3 +-- content/common/cc_messages_unittest.cc | 3 +-- content/renderer/browser_plugin/browser_plugin_compositing_helper.cc | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'content') diff --git a/content/common/cc_messages.h b/content/common/cc_messages.h index d0d1da6..1a7bcc0 100644 --- a/content/common/cc_messages.h +++ b/content/common/cc_messages.h @@ -176,8 +176,7 @@ IPC_STRUCT_TRAITS_BEGIN(cc::TextureDrawQuad) IPC_STRUCT_TRAITS_PARENT(cc::DrawQuad) IPC_STRUCT_TRAITS_MEMBER(resource_id) IPC_STRUCT_TRAITS_MEMBER(premultiplied_alpha) - IPC_STRUCT_TRAITS_MEMBER(uv_top_left) - IPC_STRUCT_TRAITS_MEMBER(uv_bottom_right) + IPC_STRUCT_TRAITS_MEMBER(uv_rect) IPC_STRUCT_TRAITS_MEMBER(flipped) IPC_STRUCT_TRAITS_END() diff --git a/content/common/cc_messages_unittest.cc b/content/common/cc_messages_unittest.cc index efa840d..7261439 100644 --- a/content/common/cc_messages_unittest.cc +++ b/content/common/cc_messages_unittest.cc @@ -144,8 +144,7 @@ class CCMessagesTest : public testing::Test { void Compare(const TextureDrawQuad* a, const TextureDrawQuad* b) { EXPECT_EQ(a->resource_id, b->resource_id); EXPECT_EQ(a->premultiplied_alpha, b->premultiplied_alpha); - EXPECT_EQ(a->uv_top_left, b->uv_top_left); - EXPECT_EQ(a->uv_bottom_right, b->uv_bottom_right); + EXPECT_EQ(a->uv_rect, b->uv_rect); EXPECT_EQ(a->flipped, b->flipped); } diff --git a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc index df54f1a..dd7d84f 100644 --- a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc +++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc @@ -94,7 +94,7 @@ void BrowserPluginCompositingHelper::UpdateUVRect() { uv_rect.set_height(static_cast(container_size_.height()) / static_cast(buffer_size_.height())); } - texture_layer_->setUV(uv_rect.origin(), uv_rect.bottom_right()); + texture_layer_->setUVRect(uv_rect); } } // namespace content -- cgit v1.1