paint_ready_rect.cc 883 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2020 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 "pdf/paint_ready_rect.h"
  5. #include <utility>
  6. #include "base/check.h"
  7. #include "third_party/skia/include/core/SkImage.h"
  8. #include "third_party/skia/include/core/SkRefCnt.h"
  9. #include "ui/gfx/geometry/rect.h"
  10. namespace chrome_pdf {
  11. PaintReadyRect::PaintReadyRect(const gfx::Rect& rect,
  12. sk_sp<SkImage> image,
  13. bool flush_now)
  14. : rect_(rect), image_(std::move(image)), flush_now_(flush_now) {
  15. DCHECK(image_);
  16. }
  17. PaintReadyRect::PaintReadyRect(const PaintReadyRect& other) = default;
  18. PaintReadyRect& PaintReadyRect::operator=(const PaintReadyRect& other) =
  19. default;
  20. PaintReadyRect::~PaintReadyRect() = default;
  21. } // namespace chrome_pdf