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

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

Issue 2257323002: Disable CFI on a few src/cc methods for perf reasons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 years, 3 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/display_item_list.cc ('k') | cc/trees/layer_tree_host.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 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/drawing_display_item.h" 5 #include "cc/playback/drawing_display_item.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return; 71 return;
72 72
73 proto->mutable_drawing_item()->mutable_id()->set_unique_id( 73 proto->mutable_drawing_item()->mutable_id()->set_unique_id(
74 picture_->uniqueID()); 74 picture_->uniqueID());
75 } 75 }
76 76
77 sk_sp<const SkPicture> DrawingDisplayItem::GetPicture() const { 77 sk_sp<const SkPicture> DrawingDisplayItem::GetPicture() const {
78 return picture_; 78 return picture_;
79 } 79 }
80 80
81 DISABLE_CFI_PERF
81 void DrawingDisplayItem::Raster(SkCanvas* canvas, 82 void DrawingDisplayItem::Raster(SkCanvas* canvas,
82 SkPicture::AbortCallback* callback) const { 83 SkPicture::AbortCallback* callback) const {
83 if (canvas->quickReject(picture_->cullRect())) 84 if (canvas->quickReject(picture_->cullRect()))
84 return; 85 return;
85 86
86 // SkPicture always does a wrapping save/restore on the canvas, so it is not 87 // SkPicture always does a wrapping save/restore on the canvas, so it is not
87 // necessary here. 88 // necessary here.
88 if (callback) 89 if (callback)
89 picture_->playback(canvas, callback); 90 picture_->playback(canvas, callback);
90 else 91 else
(...skipping 27 matching lines...) Expand all
118 } 119 }
119 120
120 void DrawingDisplayItem::CloneTo(DrawingDisplayItem* item) const { 121 void DrawingDisplayItem::CloneTo(DrawingDisplayItem* item) const {
121 item->SetNew(picture_); 122 item->SetNew(picture_);
122 } 123 }
123 124
124 size_t DrawingDisplayItem::ExternalMemoryUsage() const { 125 size_t DrawingDisplayItem::ExternalMemoryUsage() const {
125 return SkPictureUtils::ApproximateBytesUsed(picture_.get()); 126 return SkPictureUtils::ApproximateBytesUsed(picture_.get());
126 } 127 }
127 128
129 DISABLE_CFI_PERF
128 int DrawingDisplayItem::ApproximateOpCount() const { 130 int DrawingDisplayItem::ApproximateOpCount() const {
129 return picture_->approximateOpCount(); 131 return picture_->approximateOpCount();
130 } 132 }
131 133
132 } // namespace cc 134 } // namespace cc
OLDNEW
« no previous file with comments | « cc/playback/display_item_list.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698