diff options
author | danakj <danakj@chromium.org> | 2015-04-08 13:09:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-08 20:10:12 +0000 |
commit | f4bb78ba1e15f8be8a3943bedfe9a5f52c4ef42c (patch) | |
tree | 52f7eaac3e3c38d93a110d4974b1d7299f56f740 | |
parent | 8ab013435b978213a2994af7da0c5193873bfd4b (diff) | |
download | chromium_src-f4bb78ba1e15f8be8a3943bedfe9a5f52c4ef42c.zip chromium_src-f4bb78ba1e15f8be8a3943bedfe9a5f52c4ef42c.tar.gz chromium_src-f4bb78ba1e15f8be8a3943bedfe9a5f52c4ef42c.tar.bz2 |
cc: Move the quad validation checks to the place quads are inserted.
It's possible that DelegatedRendererLayerImpl decides to not append
a quad if it's not valid. In that case it could crash trying to
validate the non-existant quad.
R=piman@chromium.org
BUG=475099
Review URL: https://codereview.chromium.org/1072563002
Cr-Commit-Position: refs/heads/master@{#324278}
-rw-r--r-- | cc/layers/delegated_renderer_layer_impl.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cc/layers/delegated_renderer_layer_impl.cc b/cc/layers/delegated_renderer_layer_impl.cc index 0da4213..dfbb826 100644 --- a/cc/layers/delegated_renderer_layer_impl.cc +++ b/cc/layers/delegated_renderer_layer_impl.cc @@ -474,6 +474,9 @@ void DelegatedRendererLayerImpl::AppendRenderPassQuads( DrawQuad* output_quad = render_pass->CopyFromAndAppendDrawQuad( delegated_quad, output_shared_quad_state); output_quad->visible_rect = quad_visible_rect; + // TODO(danakj): crbug.com/455931 + output_quad->IterateResources(base::Bind( + &ValidateResource, layer_tree_impl()->resource_provider())); } else { RenderPassId delegated_contributing_render_pass_id = RenderPassDrawQuad::MaterialCast(delegated_quad)->render_pass_id; @@ -494,12 +497,12 @@ void DelegatedRendererLayerImpl::AppendRenderPassQuads( output_shared_quad_state, output_contributing_render_pass_id); output_quad->visible_rect = quad_visible_rect; + + // TODO(danakj): crbug.com/455931 + output_quad->IterateResources(base::Bind( + &ValidateResource, layer_tree_impl()->resource_provider())); } } - - // TODO(danakj): crbug.com/455931 - render_pass->quad_list.back()->IterateResources( - base::Bind(&ValidateResource, layer_tree_impl()->resource_provider())); } } |