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

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

Issue 12967018: cc: Avoid pointless gfx::Point/Size contructors when making Rects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: RectFs as well Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 "base/stringprintf.h" 7 #include "base/stringprintf.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "cc/debug/debug_colors.h" 9 #include "cc/debug/debug_colors.h"
10 #include "cc/debug/debug_rect_history.h" 10 #include "cc/debug/debug_rect_history.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 106 }
107 107
108 void HeadsUpDisplayLayerImpl::AppendQuads(QuadSink* quad_sink, 108 void HeadsUpDisplayLayerImpl::AppendQuads(QuadSink* quad_sink,
109 AppendQuadsData* append_quads_data) { 109 AppendQuadsData* append_quads_data) {
110 if (!hud_texture_->id()) 110 if (!hud_texture_->id())
111 return; 111 return;
112 112
113 SharedQuadState* shared_quad_state = 113 SharedQuadState* shared_quad_state =
114 quad_sink->UseSharedQuadState(CreateSharedQuadState()); 114 quad_sink->UseSharedQuadState(CreateSharedQuadState());
115 115
116 gfx::Rect quad_rect(gfx::Point(), bounds()); 116 gfx::Rect quad_rect(bounds());
117 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect()); 117 gfx::Rect opaque_rect(contents_opaque() ? quad_rect : gfx::Rect());
118 bool premultiplied_alpha = true; 118 bool premultiplied_alpha = true;
119 gfx::PointF uv_top_left(0.f, 0.f); 119 gfx::PointF uv_top_left(0.f, 0.f);
120 gfx::PointF uv_bottom_right(1.f, 1.f); 120 gfx::PointF uv_bottom_right(1.f, 1.f);
121 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f }; 121 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f };
122 bool flipped = false; 122 bool flipped = false;
123 scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create(); 123 scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create();
124 quad->SetNew(shared_quad_state, 124 quad->SetNew(shared_quad_state,
125 quad_rect, 125 quad_rect,
126 opaque_rect, 126 opaque_rect,
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 } 688 }
689 689
690 canvas->restore(); 690 canvas->restore();
691 } 691 }
692 692
693 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const { 693 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const {
694 return "HeadsUpDisplayLayer"; 694 return "HeadsUpDisplayLayer";
695 } 695 }
696 696
697 } // namespace cc 697 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/io_surface_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698