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

Side by Side Diff: cc/layers/heads_up_display_layer_impl.cc

Issue 1062043003: cc: Add ResourceId validation checks at the time of AppendQuads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resource-validate: fixtests Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl.cc ('k') | cc/layers/io_surface_layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/heads_up_display_layer_impl.h" 5 #include "cc/layers/heads_up_display_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); 152 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect());
153 gfx::Rect visible_quad_rect(quad_rect); 153 gfx::Rect visible_quad_rect(quad_rect);
154 bool premultiplied_alpha = true; 154 bool premultiplied_alpha = true;
155 gfx::PointF uv_top_left(0.f, 0.f); 155 gfx::PointF uv_top_left(0.f, 0.f);
156 gfx::PointF uv_bottom_right(1.f, 1.f); 156 gfx::PointF uv_bottom_right(1.f, 1.f);
157 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f }; 157 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f };
158 bool flipped = false; 158 bool flipped = false;
159 bool nearest_neighbor = false; 159 bool nearest_neighbor = false;
160 TextureDrawQuad* quad = 160 TextureDrawQuad* quad =
161 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>(); 161 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
162 // TODO(danakj): crbug.com/455931
163 layer_tree_impl()->resource_provider()->ValidateResource(
164 resources_.back()->id());
162 quad->SetNew(shared_quad_state, 165 quad->SetNew(shared_quad_state,
163 quad_rect, 166 quad_rect,
164 opaque_rect, 167 opaque_rect,
165 visible_quad_rect, 168 visible_quad_rect,
166 resources_.back()->id(), 169 resources_.back()->id(),
167 premultiplied_alpha, 170 premultiplied_alpha,
168 uv_top_left, 171 uv_top_left,
169 uv_bottom_right, 172 uv_bottom_right,
170 SK_ColorTRANSPARENT, 173 SK_ColorTRANSPARENT,
171 vertex_opacity, 174 vertex_opacity,
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 return "cc::HeadsUpDisplayLayerImpl"; 859 return "cc::HeadsUpDisplayLayerImpl";
857 } 860 }
858 861
859 void HeadsUpDisplayLayerImpl::AsValueInto( 862 void HeadsUpDisplayLayerImpl::AsValueInto(
860 base::trace_event::TracedValue* dict) const { 863 base::trace_event::TracedValue* dict) const {
861 LayerImpl::AsValueInto(dict); 864 LayerImpl::AsValueInto(dict);
862 dict->SetString("layer_name", "Heads Up Display Layer"); 865 dict->SetString("layer_name", "Heads Up Display Layer");
863 } 866 }
864 867
865 } // namespace cc 868 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl.cc ('k') | cc/layers/io_surface_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698