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

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

Issue 18432002: Blend TextureLayer background-color at draw time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resolved conflicts with TOT Created 7 years, 5 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/nine_patch_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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f }; 117 const float vertex_opacity[] = { 1.f, 1.f, 1.f, 1.f };
118 bool flipped = false; 118 bool flipped = false;
119 scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create(); 119 scoped_ptr<TextureDrawQuad> quad = TextureDrawQuad::Create();
120 quad->SetNew(shared_quad_state, 120 quad->SetNew(shared_quad_state,
121 quad_rect, 121 quad_rect,
122 opaque_rect, 122 opaque_rect,
123 hud_resource_->id(), 123 hud_resource_->id(),
124 premultiplied_alpha, 124 premultiplied_alpha,
125 uv_top_left, 125 uv_top_left,
126 uv_bottom_right, 126 uv_bottom_right,
127 SK_ColorTRANSPARENT,
127 vertex_opacity, 128 vertex_opacity,
128 flipped); 129 flipped);
129 quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data); 130 quad_sink->Append(quad.PassAs<DrawQuad>(), append_quads_data);
130 } 131 }
131 132
132 void HeadsUpDisplayLayerImpl::UpdateHudTexture( 133 void HeadsUpDisplayLayerImpl::UpdateHudTexture(
133 ResourceProvider* resource_provider) { 134 ResourceProvider* resource_provider) {
134 if (!hud_resource_->id()) 135 if (!hud_resource_->id())
135 return; 136 return;
136 137
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 canvas->restore(); 687 canvas->restore();
687 } 688 }
688 } 689 }
689 } 690 }
690 691
691 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const { 692 const char* HeadsUpDisplayLayerImpl::LayerTypeAsString() const {
692 return "cc::HeadsUpDisplayLayerImpl"; 693 return "cc::HeadsUpDisplayLayerImpl";
693 } 694 }
694 695
695 } // namespace cc 696 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/nine_patch_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698