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

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

Issue 783543003: Update from https://crrev.com/306901 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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_frame_provider_unittest.cc ('k') | cc/layers/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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 PopulateSharedQuadState(shared_quad_state); 142 PopulateSharedQuadState(shared_quad_state);
143 143
144 gfx::Rect quad_rect(content_bounds()); 144 gfx::Rect quad_rect(content_bounds());
145 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); 145 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect());
146 gfx::Rect visible_quad_rect(quad_rect); 146 gfx::Rect visible_quad_rect(quad_rect);
147 bool premultiplied_alpha = true; 147 bool premultiplied_alpha = true;
148 gfx::PointF uv_top_left(0.f, 0.f); 148 gfx::PointF uv_top_left(0.f, 0.f);
149 gfx::PointF uv_bottom_right(1.f, 1.f); 149 gfx::PointF uv_bottom_right(1.f, 1.f);
150 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f }; 150 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f };
151 bool flipped = false; 151 bool flipped = false;
152 bool nearest_neighbor = false;
152 TextureDrawQuad* quad = 153 TextureDrawQuad* quad =
153 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>(); 154 render_pass->CreateAndAppendDrawQuad<TextureDrawQuad>();
154 quad->SetNew(shared_quad_state, 155 quad->SetNew(shared_quad_state,
155 quad_rect, 156 quad_rect,
156 opaque_rect, 157 opaque_rect,
157 visible_quad_rect, 158 visible_quad_rect,
158 resources_.back()->id(), 159 resources_.back()->id(),
159 premultiplied_alpha, 160 premultiplied_alpha,
160 uv_top_left, 161 uv_top_left,
161 uv_bottom_right, 162 uv_bottom_right,
162 SK_ColorTRANSPARENT, 163 SK_ColorTRANSPARENT,
163 vertex_opacity, 164 vertex_opacity,
164 flipped); 165 flipped,
166 nearest_neighbor);
165 } 167 }
166 168
167 void HeadsUpDisplayLayerImpl::UpdateHudTexture( 169 void HeadsUpDisplayLayerImpl::UpdateHudTexture(
168 DrawMode draw_mode, 170 DrawMode draw_mode,
169 ResourceProvider* resource_provider) { 171 ResourceProvider* resource_provider) {
170 if (draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE || !resources_.back()->id()) 172 if (draw_mode == DRAW_MODE_RESOURCELESS_SOFTWARE || !resources_.back()->id())
171 return; 173 return;
172 174
173 SkISize canvas_size; 175 SkISize canvas_size;
174 if (hud_canvas_) 176 if (hud_canvas_)
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 return "cc::HeadsUpDisplayLayerImpl"; 836 return "cc::HeadsUpDisplayLayerImpl";
835 } 837 }
836 838
837 void HeadsUpDisplayLayerImpl::AsValueInto( 839 void HeadsUpDisplayLayerImpl::AsValueInto(
838 base::debug::TracedValue* dict) const { 840 base::debug::TracedValue* dict) const {
839 LayerImpl::AsValueInto(dict); 841 LayerImpl::AsValueInto(dict);
840 dict->SetString("layer_name", "Heads Up Display Layer"); 842 dict->SetString("layer_name", "Heads Up Display Layer");
841 } 843 }
842 844
843 } // namespace cc 845 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/delegated_frame_provider_unittest.cc ('k') | cc/layers/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698