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

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

Issue 2880813002: Revert of Add stable id to PaintImage. (Closed)
Patch Set: 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_image.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_image.h" 5 #include "cc/paint/paint_image.h"
6 6
7 namespace cc { 7 namespace cc {
8 8
9 base::AtomicSequenceNumber PaintImage::s_next_id_;
10
11 PaintImage::PaintImage() = default; 9 PaintImage::PaintImage() = default;
12 PaintImage::PaintImage(Id id, 10 PaintImage::PaintImage(sk_sp<SkImage> sk_image,
13 sk_sp<SkImage> sk_image,
14 AnimationType animation_type, 11 AnimationType animation_type,
15 CompletionState completion_state) 12 CompletionState completion_state)
16 : id_(id), 13 : sk_image_(std::move(sk_image)),
17 sk_image_(std::move(sk_image)),
18 animation_type_(animation_type), 14 animation_type_(animation_type),
19 completion_state_(completion_state) {} 15 completion_state_(completion_state) {}
20 PaintImage::PaintImage(const PaintImage& other) = default; 16 PaintImage::PaintImage(const PaintImage& other) = default;
21 PaintImage::PaintImage(PaintImage&& other) = default; 17 PaintImage::PaintImage(PaintImage&& other) = default;
22 PaintImage::~PaintImage() = default; 18 PaintImage::~PaintImage() = default;
23 19
24 PaintImage& PaintImage::operator=(const PaintImage& other) = default; 20 PaintImage& PaintImage::operator=(const PaintImage& other) = default;
25 PaintImage& PaintImage::operator=(PaintImage&& other) = default; 21 PaintImage& PaintImage::operator=(PaintImage&& other) = default;
26 22
27 bool PaintImage::operator==(const PaintImage& other) { 23 bool PaintImage::operator==(const PaintImage& other) {
28 return id_ == other.id_ && sk_image_ == other.sk_image_ && 24 return sk_image_ == other.sk_image_ &&
29 animation_type_ == other.animation_type_ && 25 animation_type_ == other.animation_type_ &&
30 completion_state_ == other.completion_state_; 26 completion_state_ == other.completion_state_;
31 } 27 }
32 28
33 PaintImage::Id PaintImage::GetNextId() {
34 return s_next_id_.GetNext();
35 }
36
37 } // namespace cc 29 } // namespace cc
OLDNEW
« no previous file with comments | « cc/paint/paint_image.h ('k') | cc/paint/paint_op_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698