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

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

Issue 1968363002: SurfaceAggregator should check whether output is secure when drawin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/ipc/cc_param_traits_unittest.cc ('k') | cc/layers/layer_impl.h » ('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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); 140 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect());
141 gfx::Rect visible_quad_rect(quad_rect); 141 gfx::Rect visible_quad_rect(quad_rect);
142 bool premultiplied_alpha = true; 142 bool premultiplied_alpha = true;
143 gfx::PointF uv_top_left(0.f, 0.f); 143 gfx::PointF uv_top_left(0.f, 0.f);
144 gfx::PointF uv_bottom_right(1.f, 1.f); 144 gfx::PointF uv_bottom_right(1.f, 1.f);
145 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f }; 145 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f };
146 bool flipped = false; 146 bool flipped = false;
147 bool nearest_neighbor = false; 147 bool nearest_neighbor = false;
148 TextureDrawQuad* quad = 148 TextureDrawQuad* quad =
149 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>(); 149 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
150 quad->SetNew(shared_quad_state, 150 quad->SetNew(shared_quad_state, quad_rect, opaque_rect, visible_quad_rect,
151 quad_rect, 151 resources_.back()->id(), premultiplied_alpha, uv_top_left,
152 opaque_rect, 152 uv_bottom_right, SK_ColorTRANSPARENT, vertex_opacity, flipped,
153 visible_quad_rect, 153 nearest_neighbor, false);
154 resources_.back()->id(),
155 premultiplied_alpha,
156 uv_top_left,
157 uv_bottom_right,
158 SK_ColorTRANSPARENT,
159 vertex_opacity,
160 flipped,
161 nearest_neighbor);
162 ValidateQuadResources(quad); 154 ValidateQuadResources(quad);
163 } 155 }
164 156
165 void HeadsUpDisplayLayerImpl::UpdateHudTexture( 157 void HeadsUpDisplayLayerImpl::UpdateHudTexture(
166 DrawMode draw_mode, 158 DrawMode draw_mode,
167 ResourceProvider* resource_provider) { 159 ResourceProvider* resource_provider) {
168 if (draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE || !resources_.back()->id()) 160 if (draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE || !resources_.back()->id())
169 return; 161 return;
170 162
171 SkISize canvas_size; 163 SkISize canvas_size;
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 return "cc::HeadsUpDisplayLayerImpl"; 798 return "cc::HeadsUpDisplayLayerImpl";
807 } 799 }
808 800
809 void HeadsUpDisplayLayerImpl::AsValueInto( 801 void HeadsUpDisplayLayerImpl::AsValueInto(
810 base::trace_event::TracedValue* dict) const { 802 base::trace_event::TracedValue* dict) const {
811 LayerImpl::AsValueInto(dict); 803 LayerImpl::AsValueInto(dict);
812 dict->SetString("layer_name", "Heads Up Display Layer"); 804 dict->SetString("layer_name", "Heads Up Display Layer");
813 } 805 }
814 806
815 } // namespace cc 807 } // namespace cc
OLDNEW
« no previous file with comments | « cc/ipc/cc_param_traits_unittest.cc ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698