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

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

Issue 2939243002: cc/blink: Veto checker-imaging for multipart image resources. (Closed)
Patch Set: tested Created 3 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
« no previous file with comments | « cc/paint/paint_image.h ('k') | cc/tiles/checker_image_tracker.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 #include "base/atomic_sequence_num.h" 6 #include "base/atomic_sequence_num.h"
7 7
8 namespace cc { 8 namespace cc {
9 namespace { 9 namespace {
10 base::StaticAtomicSequenceNumber s_next_id_; 10 base::StaticAtomicSequenceNumber s_next_id_;
11 } 11 }
12 12
13 PaintImage::PaintImage() = default; 13 PaintImage::PaintImage() = default;
14 PaintImage::PaintImage(Id id, 14 PaintImage::PaintImage(Id id,
15 sk_sp<SkImage> sk_image, 15 sk_sp<SkImage> sk_image,
16 AnimationType animation_type, 16 AnimationType animation_type,
17 CompletionState completion_state, 17 CompletionState completion_state,
18 size_t frame_count) 18 size_t frame_count,
19 bool is_multipart)
19 : id_(id), 20 : id_(id),
20 sk_image_(std::move(sk_image)), 21 sk_image_(std::move(sk_image)),
21 animation_type_(animation_type), 22 animation_type_(animation_type),
22 completion_state_(completion_state), 23 completion_state_(completion_state),
23 frame_count_(frame_count) {} 24 frame_count_(frame_count),
25 is_multipart_(is_multipart) {}
24 PaintImage::PaintImage(const PaintImage& other) = default; 26 PaintImage::PaintImage(const PaintImage& other) = default;
25 PaintImage::PaintImage(PaintImage&& other) = default; 27 PaintImage::PaintImage(PaintImage&& other) = default;
26 PaintImage::~PaintImage() = default; 28 PaintImage::~PaintImage() = default;
27 29
28 PaintImage& PaintImage::operator=(const PaintImage& other) = default; 30 PaintImage& PaintImage::operator=(const PaintImage& other) = default;
29 PaintImage& PaintImage::operator=(PaintImage&& other) = default; 31 PaintImage& PaintImage::operator=(PaintImage&& other) = default;
30 32
31 bool PaintImage::operator==(const PaintImage& other) const { 33 bool PaintImage::operator==(const PaintImage& other) const {
32 return id_ == other.id_ && sk_image_ == other.sk_image_ && 34 return id_ == other.id_ && sk_image_ == other.sk_image_ &&
33 animation_type_ == other.animation_type_ && 35 animation_type_ == other.animation_type_ &&
34 completion_state_ == other.completion_state_ && 36 completion_state_ == other.completion_state_ &&
35 frame_count_ == other.frame_count_; 37 frame_count_ == other.frame_count_ &&
38 is_multipart_ == other.is_multipart_;
36 } 39 }
37 40
38 PaintImage::Id PaintImage::GetNextId() { 41 PaintImage::Id PaintImage::GetNextId() {
39 return s_next_id_.GetNext(); 42 return s_next_id_.GetNext();
40 } 43 }
41 44
42 } // namespace cc 45 } // namespace cc
OLDNEW
« no previous file with comments | « cc/paint/paint_image.h ('k') | cc/tiles/checker_image_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698