summaryrefslogtreecommitdiffstats
path: root/views/view.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-19 21:04:19 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-19 21:04:19 +0000
commit28cd2bb36606c077618ec0976b889ae11ca55b0c (patch)
tree0a65fe9a993c9d92f915ba300a2730eed46d6703 /views/view.cc
parent4a7d639c0eaf559eda83a5c0e375f83bb8cf7171 (diff)
downloadchromium_src-28cd2bb36606c077618ec0976b889ae11ca55b0c.zip
chromium_src-28cd2bb36606c077618ec0976b889ae11ca55b0c.tar.gz
chromium_src-28cd2bb36606c077618ec0976b889ae11ca55b0c.tar.bz2
Make specifying a texture optional on a Layer.
This is for Layers that participate in Draw() ordering, transforming and clipping, but do not themselves actually render anything. Also changes LayerTest to use RunAllPending() rather than using the weird QuitOnComposited test type I had. BUG=none TEST=see unittest Review URL: http://codereview.chromium.org/7941016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101829 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.cc')
-rw-r--r--views/view.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/views/view.cc b/views/view.cc
index b0f0b08..57f724d 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -1111,7 +1111,8 @@ void View::SetFillsBoundsOpaquely(bool fills_bounds_opaquely) {
}
bool View::SetExternalTexture(ui::Texture* texture) {
- if (!texture && !layer_helper_.get())
+ DCHECK(texture);
+ if (!layer_helper_.get())
return true;
if (!layer_helper_.get())
@@ -1120,10 +1121,8 @@ bool View::SetExternalTexture(ui::Texture* texture) {
// Child views must not paint into the external texture. So make sure each
// child view has its own layer to paint into.
- if (texture) {
- for (Views::iterator i = children_.begin(); i != children_.end(); ++i)
- (*i)->SetPaintToLayer(true);
- }
+ for (Views::iterator i = children_.begin(); i != children_.end(); ++i)
+ (*i)->SetPaintToLayer(true);
SchedulePaintInRect(GetLocalBounds());