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

Side by Side Diff: cc/playback/transform_display_item.cc

Issue 2747273002: cc: Remove AsValue virtual from DisplayItem. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « cc/playback/transform_display_item.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/playback/transform_display_item.h" 5 #include "cc/playback/transform_display_item.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/trace_event/trace_event_argument.h" 10 #include "base/trace_event/trace_event_argument.h"
(...skipping 13 matching lines...) Expand all
24 transform_ = transform; 24 transform_ = transform;
25 } 25 }
26 26
27 void TransformDisplayItem::Raster(SkCanvas* canvas, 27 void TransformDisplayItem::Raster(SkCanvas* canvas,
28 SkPicture::AbortCallback* callback) const { 28 SkPicture::AbortCallback* callback) const {
29 canvas->save(); 29 canvas->save();
30 if (!transform_.IsIdentity()) 30 if (!transform_.IsIdentity())
31 canvas->concat(transform_.matrix()); 31 canvas->concat(transform_.matrix());
32 } 32 }
33 33
34 void TransformDisplayItem::AsValueInto(
35 const gfx::Rect& visual_rect,
36 base::trace_event::TracedValue* array) const {
37 array->AppendString(base::StringPrintf(
38 "TransformDisplayItem transform: [%s] visualRect: [%s]",
39 transform_.ToString().c_str(), visual_rect.ToString().c_str()));
40 }
41
42 EndTransformDisplayItem::EndTransformDisplayItem() 34 EndTransformDisplayItem::EndTransformDisplayItem()
43 : DisplayItem(END_TRANSFORM) {} 35 : DisplayItem(END_TRANSFORM) {}
44 36
45 EndTransformDisplayItem::~EndTransformDisplayItem() { 37 EndTransformDisplayItem::~EndTransformDisplayItem() {
46 } 38 }
47 39
48 void EndTransformDisplayItem::Raster( 40 void EndTransformDisplayItem::Raster(
49 SkCanvas* canvas, 41 SkCanvas* canvas,
50 SkPicture::AbortCallback* callback) const { 42 SkPicture::AbortCallback* callback) const {
51 canvas->restore(); 43 canvas->restore();
52 } 44 }
53 45
54 void EndTransformDisplayItem::AsValueInto(
55 const gfx::Rect& visual_rect,
56 base::trace_event::TracedValue* array) const {
57 array->AppendString(
58 base::StringPrintf("EndTransformDisplayItem visualRect: [%s]",
59 visual_rect.ToString().c_str()));
60 }
61
62 } // namespace cc 46 } // namespace cc
OLDNEW
« no previous file with comments | « cc/playback/transform_display_item.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698