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

Side by Side Diff: cc/paint/paint_op_buffer.cc

Issue 2875343002: cc: fix for MSAA veto. (Closed)
Patch Set: Windows fix. Created 3 years, 7 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/paint/paint_op_buffer.h ('k') | cc/paint/paint_op_buffer_unittest.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/paint/paint_op_buffer.h" 5 #include "cc/paint/paint_op_buffer.h"
6 6
7 #include "cc/paint/display_item_list.h" 7 #include "cc/paint/display_item_list.h"
8 #include "cc/paint/paint_record.h" 8 #include "cc/paint/paint_record.h"
9 #include "third_party/skia/include/core/SkAnnotation.h" 9 #include "third_party/skia/include/core/SkAnnotation.h"
10 10
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 } else if (paintStyle == PaintFlags::kFill_Style && 481 } else if (paintStyle == PaintFlags::kFill_Style &&
482 pathBounds.width() < 64.f && pathBounds.height() < 64.f && 482 pathBounds.width() < 64.f && pathBounds.height() < 64.f &&
483 !path.isVolatile()) { 483 !path.isVolatile()) {
484 // AADF eligible concave path is not slow. 484 // AADF eligible concave path is not slow.
485 return 0; 485 return 0;
486 } else { 486 } else {
487 return 1; 487 return 1;
488 } 488 }
489 } 489 }
490 490
491 int DrawRecordOp::CountSlowPaths() const {
492 return record->numSlowPaths();
493 }
494
491 AnnotateOp::AnnotateOp(PaintCanvas::AnnotationType annotation_type, 495 AnnotateOp::AnnotateOp(PaintCanvas::AnnotationType annotation_type,
492 const SkRect& rect, 496 const SkRect& rect,
493 sk_sp<SkData> data) 497 sk_sp<SkData> data)
494 : annotation_type(annotation_type), rect(rect), data(std::move(data)) {} 498 : annotation_type(annotation_type), rect(rect), data(std::move(data)) {}
495 499
496 AnnotateOp::~AnnotateOp() = default; 500 AnnotateOp::~AnnotateOp() = default;
497 501
498 DrawDisplayItemListOp::DrawDisplayItemListOp( 502 DrawDisplayItemListOp::DrawDisplayItemListOp(
499 scoped_refptr<DisplayItemList> list) 503 scoped_refptr<DisplayItemList> list)
500 : list(list) {} 504 : list(list) {}
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 return std::make_pair(op, skip); 712 return std::make_pair(op, skip);
709 } 713 }
710 714
711 void PaintOpBuffer::ShrinkToFit() { 715 void PaintOpBuffer::ShrinkToFit() {
712 if (!used_ || used_ == reserved_) 716 if (!used_ || used_ == reserved_)
713 return; 717 return;
714 ReallocBuffer(used_); 718 ReallocBuffer(used_);
715 } 719 }
716 720
717 } // namespace cc 721 } // namespace cc
OLDNEW
« no previous file with comments | « cc/paint/paint_op_buffer.h ('k') | cc/paint/paint_op_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698