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

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

Issue 2842333003: cc: Update discardable image metadata generation to get PaintImages. (Closed)
Patch Set: addressed comments 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
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/discardable_image_store.h"
7 #include "cc/paint/display_item_list.h" 8 #include "cc/paint/display_item_list.h"
8 #include "cc/paint/paint_record.h" 9 #include "cc/paint/paint_record.h"
9 #include "third_party/skia/include/core/SkAnnotation.h" 10 #include "third_party/skia/include/core/SkAnnotation.h"
10 11
11 namespace cc { 12 namespace cc {
12 13
13 #define TYPES(M) \ 14 #define TYPES(M) \
14 M(AnnotateOp) \ 15 M(AnnotateOp) \
15 M(ClipPathOp) \ 16 M(ClipPathOp) \
16 M(ClipRectOp) \ 17 M(ClipRectOp) \
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 } 576 }
576 577
577 void PaintOpBuffer::ShrinkToFit() { 578 void PaintOpBuffer::ShrinkToFit() {
578 if (!used_ || used_ == reserved_) 579 if (!used_ || used_ == reserved_)
579 return; 580 return;
580 data_.realloc(used_); 581 data_.realloc(used_);
581 reserved_ = used_; 582 reserved_ = used_;
582 } 583 }
583 584
584 } // namespace cc 585 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698