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

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

Issue 337163003: Switch to the new SkCanvas::willSave() API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « skia/ext/analysis_canvas.h ('k') | skia/ext/benchmarking_canvas.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 (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/debug/trace_event.h" 5 #include "base/debug/trace_event.h"
6 #include "base/logging.h" 6 #include "base/logging.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/SkRRect.h" 9 #include "third_party/skia/include/core/SkRRect.h"
10 #include "third_party/skia/include/core/SkShader.h" 10 #include "third_party/skia/include/core/SkShader.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 SetForceNotSolid(true); 347 SetForceNotSolid(true);
348 } 348 }
349 if (force_not_transparent_stack_level_ == kNoLayer) { 349 if (force_not_transparent_stack_level_ == kNoLayer) {
350 force_not_transparent_stack_level_ = saved_stack_size_; 350 force_not_transparent_stack_level_ = saved_stack_size_;
351 SetForceNotTransparent(true); 351 SetForceNotTransparent(true);
352 } 352 }
353 353
354 INHERITED::onClipRect(rrect.getBounds(), op, edge_style); 354 INHERITED::onClipRect(rrect.getBounds(), op, edge_style);
355 } 355 }
356 356
357 void AnalysisCanvas::willSave(SkCanvas::SaveFlags flags) { 357 void AnalysisCanvas::willSave() {
358 ++saved_stack_size_; 358 ++saved_stack_size_;
359 INHERITED::willSave(flags); 359 INHERITED::willSave();
360 } 360 }
361 361
362 SkCanvas::SaveLayerStrategy AnalysisCanvas::willSaveLayer( 362 SkCanvas::SaveLayerStrategy AnalysisCanvas::willSaveLayer(
363 const SkRect* bounds, 363 const SkRect* bounds,
364 const SkPaint* paint, 364 const SkPaint* paint,
365 SkCanvas::SaveFlags flags) { 365 SkCanvas::SaveFlags flags) {
366 366
367 ++saved_stack_size_; 367 ++saved_stack_size_;
368 368
369 SkIRect canvas_ibounds = SkIRect::MakeSize(this->getDeviceSize()); 369 SkIRect canvas_ibounds = SkIRect::MakeSize(this->getDeviceSize());
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 force_not_transparent_stack_level_ = kNoLayer; 413 force_not_transparent_stack_level_ = kNoLayer;
414 } 414 }
415 } 415 }
416 416
417 INHERITED::willRestore(); 417 INHERITED::willRestore();
418 } 418 }
419 419
420 } // namespace skia 420 } // namespace skia
421 421
422 422
OLDNEW
« no previous file with comments | « skia/ext/analysis_canvas.h ('k') | skia/ext/benchmarking_canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698