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

Side by Side Diff: cc/quads/texture_draw_quad.cc

Issue 853393002: cc: refactor of MathUtil::AddToTracedValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/quads/stream_video_draw_quad.cc ('k') | cc/quads/yuv_video_draw_quad.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/quads/texture_draw_quad.h" 5 #include "cc/quads/texture_draw_quad.h"
6 6
7 #include "base/debug/trace_event_argument.h" 7 #include "base/debug/trace_event_argument.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 88
89 const TextureDrawQuad* TextureDrawQuad::MaterialCast(const DrawQuad* quad) { 89 const TextureDrawQuad* TextureDrawQuad::MaterialCast(const DrawQuad* quad) {
90 DCHECK(quad->material == DrawQuad::TEXTURE_CONTENT); 90 DCHECK(quad->material == DrawQuad::TEXTURE_CONTENT);
91 return static_cast<const TextureDrawQuad*>(quad); 91 return static_cast<const TextureDrawQuad*>(quad);
92 } 92 }
93 93
94 void TextureDrawQuad::ExtendValue(base::debug::TracedValue* value) const { 94 void TextureDrawQuad::ExtendValue(base::debug::TracedValue* value) const {
95 value->SetInteger("resource_id", resource_id); 95 value->SetInteger("resource_id", resource_id);
96 value->SetBoolean("premultiplied_alpha", premultiplied_alpha); 96 value->SetBoolean("premultiplied_alpha", premultiplied_alpha);
97 value->BeginArray("uv_top_left");
98 MathUtil::AddToTracedValue(uv_top_left, value);
99 value->EndArray();
100 97
101 value->BeginArray("uv_bottom_right"); 98 MathUtil::AddToTracedValue("uv_top_left", uv_top_left, value);
102 MathUtil::AddToTracedValue(uv_bottom_right, value); 99 MathUtil::AddToTracedValue("uv_bottom_right", uv_bottom_right, value);
103 value->EndArray();
104 100
105 value->SetInteger("background_color", background_color); 101 value->SetInteger("background_color", background_color);
106 102
107 value->BeginArray("vertex_opacity"); 103 value->BeginArray("vertex_opacity");
108 for (size_t i = 0; i < 4; ++i) 104 for (size_t i = 0; i < 4; ++i)
109 value->AppendDouble(vertex_opacity[i]); 105 value->AppendDouble(vertex_opacity[i]);
110 value->EndArray(); 106 value->EndArray();
111 107
112 value->SetBoolean("flipped", flipped); 108 value->SetBoolean("flipped", flipped);
113 value->SetBoolean("nearest_neighbor", nearest_neighbor); 109 value->SetBoolean("nearest_neighbor", nearest_neighbor);
114 } 110 }
115 111
116 } // namespace cc 112 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/stream_video_draw_quad.cc ('k') | cc/quads/yuv_video_draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698