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

Side by Side Diff: skia/ext/analysis_canvas.cc

Issue 2264673003: Add override to AnalysisCanvas for new SkCanvas virtual, onDrawArc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « skia/ext/analysis_canvas.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "base/trace_event/trace_event.h" 6 #include "base/trace_event/trace_event.h"
7 #include "skia/ext/analysis_canvas.h" 7 #include "skia/ext/analysis_canvas.h"
8 #include "third_party/skia/include/core/SkDraw.h" 8 #include "third_party/skia/include/core/SkDraw.h"
9 #include "third_party/skia/include/core/SkPath.h" 9 #include "third_party/skia/include/core/SkPath.h"
10 #include "third_party/skia/include/core/SkRRect.h" 10 #include "third_party/skia/include/core/SkRRect.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 ++draw_op_count_; 168 ++draw_op_count_;
169 } 169 }
170 170
171 void AnalysisCanvas::onDrawOval(const SkRect& oval, const SkPaint& paint) { 171 void AnalysisCanvas::onDrawOval(const SkRect& oval, const SkPaint& paint) {
172 TRACE_EVENT0("disabled-by-default-skia", "AnalysisCanvas::onDrawOval"); 172 TRACE_EVENT0("disabled-by-default-skia", "AnalysisCanvas::onDrawOval");
173 is_solid_color_ = false; 173 is_solid_color_ = false;
174 is_transparent_ = false; 174 is_transparent_ = false;
175 ++draw_op_count_; 175 ++draw_op_count_;
176 } 176 }
177 177
178 void AnalysisCanvas::onDrawArc(const SkRect& oval,
179 SkScalar startAngle,
180 SkScalar sweepAngle,
181 bool useCenter,
182 const SkPaint& paint) {
183 TRACE_EVENT0("disabled-by-default-skia", "AnalysisCanvas::onDrawArc");
184 is_solid_color_ = false;
185 is_transparent_ = false;
186 ++draw_op_count_;
187 }
188
178 void AnalysisCanvas::onDrawRRect(const SkRRect& rr, const SkPaint& paint) { 189 void AnalysisCanvas::onDrawRRect(const SkRRect& rr, const SkPaint& paint) {
179 TRACE_EVENT0("disabled-by-default-skia", "AnalysisCanvas::onDrawRRect"); 190 TRACE_EVENT0("disabled-by-default-skia", "AnalysisCanvas::onDrawRRect");
180 // This should add the SkRRect to an SkPath, and call 191 // This should add the SkRRect to an SkPath, and call
181 // drawPath, but since drawPath ignores the SkPath, just 192 // drawPath, but since drawPath ignores the SkPath, just
182 // do the same work here. 193 // do the same work here.
183 is_solid_color_ = false; 194 is_solid_color_ = false;
184 is_transparent_ = false; 195 is_transparent_ = false;
185 ++draw_op_count_; 196 ++draw_op_count_;
186 } 197 }
187 198
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 force_not_transparent_stack_level_ = kNoLayer; 497 force_not_transparent_stack_level_ = kNoLayer;
487 } 498 }
488 } 499 }
489 500
490 INHERITED::willRestore(); 501 INHERITED::willRestore();
491 } 502 }
492 503
493 } // namespace skia 504 } // namespace skia
494 505
495 506
OLDNEW
« no previous file with comments | « skia/ext/analysis_canvas.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698