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

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

Issue 1535833002: Delete CC. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-5
Patch Set: rebase Created 4 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/debug_border_draw_quad.h ('k') | cc/quads/draw_polygon.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "cc/quads/debug_border_draw_quad.h"
6
7 #include "base/logging.h"
8 #include "base/trace_event/trace_event_argument.h"
9 #include "base/values.h"
10
11 namespace cc {
12
13 DebugBorderDrawQuad::DebugBorderDrawQuad()
14 : color(0),
15 width(0) {
16 }
17
18 void DebugBorderDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
19 const gfx::Rect& rect,
20 const gfx::Rect& visible_rect,
21 SkColor color,
22 int width) {
23 gfx::Rect opaque_rect;
24 bool needs_blending = SkColorGetA(color) < 255;
25 DrawQuad::SetAll(shared_quad_state, DrawQuad::DEBUG_BORDER, rect, opaque_rect,
26 visible_rect, needs_blending);
27 this->color = color;
28 this->width = width;
29 }
30
31 void DebugBorderDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
32 const gfx::Rect& rect,
33 const gfx::Rect& opaque_rect,
34 const gfx::Rect& visible_rect,
35 bool needs_blending,
36 SkColor color,
37 int width) {
38 DrawQuad::SetAll(shared_quad_state, DrawQuad::DEBUG_BORDER, rect, opaque_rect,
39 visible_rect, needs_blending);
40 this->color = color;
41 this->width = width;
42 }
43
44 void DebugBorderDrawQuad::IterateResources(
45 const ResourceIteratorCallback& callback) {}
46
47 const DebugBorderDrawQuad* DebugBorderDrawQuad::MaterialCast(
48 const DrawQuad* quad) {
49 DCHECK(quad->material == DrawQuad::DEBUG_BORDER);
50 return static_cast<const DebugBorderDrawQuad*>(quad);
51 }
52
53 void DebugBorderDrawQuad::ExtendValue(
54 base::trace_event::TracedValue* value) const {
55 value->SetInteger("color", color);
56 value->SetInteger("width", width);
57 }
58
59 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/debug_border_draw_quad.h ('k') | cc/quads/draw_polygon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698