paint_worklet_job.cc 835 B

1234567891011121314151617181920212223242526
  1. // Copyright 2019 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "cc/paint/paint_worklet_job.h"
  5. namespace cc {
  6. PaintWorkletJob::PaintWorkletJob(
  7. int layer_id,
  8. scoped_refptr<const PaintWorkletInput> input,
  9. AnimatedPropertyValues animated_property_values)
  10. : layer_id_(layer_id),
  11. input_(std::move(input)),
  12. animated_property_values_(std::move(animated_property_values)) {}
  13. PaintWorkletJob::PaintWorkletJob(const PaintWorkletJob& other) = default;
  14. PaintWorkletJob::PaintWorkletJob(PaintWorkletJob&& other) = default;
  15. PaintWorkletJob::~PaintWorkletJob() = default;
  16. void PaintWorkletJob::SetOutput(sk_sp<PaintRecord> output) {
  17. DCHECK(!output_);
  18. output_ = std::move(output);
  19. }
  20. } // namespace cc