summaryrefslogtreecommitdiffstats
path: root/views/view.cc
diff options
context:
space:
mode:
authorbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-14 15:44:38 +0000
committerbacker@chromium.org <backer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-14 15:44:38 +0000
commita97527be35ba9df832a0a711bb443332c6e455dc (patch)
treecbf96d1611a59d18b851b1d18a4ff9bf4b31f7ce /views/view.cc
parent448765cbbcdb16aca6331d7fccbe07c1aa7b9593 (diff)
downloadchromium_src-a97527be35ba9df832a0a711bb443332c6e455dc.zip
chromium_src-a97527be35ba9df832a0a711bb443332c6e455dc.tar.gz
chromium_src-a97527be35ba9df832a0a711bb443332c6e455dc.tar.bz2
Fix for SetExternalTexture.
We don't want to SetCanvas (or prepare a canvas to be set), if the Layer is being updated externally. BUG=none TEST=TOUCH_UI build displays google.com Review URL: http://codereview.chromium.org/7889035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.cc')
-rw-r--r--views/view.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/views/view.cc b/views/view.cc
index bf28aea..7ea42bf 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -1132,9 +1132,8 @@ bool View::SetExternalTexture(ui::Texture* texture) {
(*i)->SetPaintToLayer(true);
}
- layer_helper_->set_layer_updated_externally(use_external);
if (layer())
- layer()->SetTexture(texture);
+ layer()->SetExternalTexture(texture);
SchedulePaintInRect(GetLocalBounds());
@@ -1205,10 +1204,6 @@ void View::UpdateLayerBounds(const gfx::Point& offset) {
}
void View::OnPaintLayer(gfx::Canvas* canvas) {
- // If someone else is directly providing our Layer's texture, we should not
- // do any rendering.
- if (layer_helper_->layer_updated_externally())
- return;
canvas->AsCanvasSkia()->drawColor(SK_ColorBLACK, SkXfermode::kClear_Mode);
PaintCommon(canvas);
}
@@ -1470,7 +1465,7 @@ void View::BoundsChanged(const gfx::Rect& previous_bounds) {
layer_helper_->property_setter()->SetBounds(layer(), bounds_);
}
if (previous_bounds.size() != bounds_.size() &&
- !layer_helper_->layer_updated_externally()) {
+ !layer()->layer_updated_externally()) {
// If our bounds have changed then we need to update the complete
// texture.
layer()->SchedulePaint(GetLocalBounds());
@@ -1650,8 +1645,8 @@ bool View::ConvertPointFromAncestor(const View* ancestor,
bool View::ShouldPaintToLayer() const {
return use_acceleration_when_possible &&
((layer_helper_.get() && layer_helper_->ShouldPaintToLayer()) ||
- (parent_ && parent_->layer_helper_.get() &&
- parent_->layer_helper_->layer_updated_externally()));
+ (parent_ && parent_->layer() &&
+ parent_->layer()->layer_updated_externally()));
}
void View::CreateLayer() {