chromium/ui/views/paint_info.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/views/paint_info.h"
#include "base/feature_list.h"
#include "ui/views/views_features.h"

namespace views {
namespace {

gfx::Rect GetSnappedRecordingBoundsInternal(
    const gfx::Rect& paint_recording_bounds,
    float device_scale_factor,
    const gfx::Size& parent_size,
    const gfx::Rect& child_bounds) {}

// Layer's paint info should use the corner scaling logic to compute
// the recording which is what Views uses to compte the view's
// paint_recording_bounds_, with exception that a view touches the right/bottom
// edges of the parent, and its layer has to be able to paint to these
// edges. Such cases should be handled case by case basis.
gfx::Rect GetViewsLayerRecordingBounds(const ui::PaintContext& context,
                                       const gfx::Rect& child_bounds) {}

}  // namespace

// static
PaintInfo PaintInfo::CreateRootPaintInfo(const ui::PaintContext& root_context,
                                         const gfx::Size& size) {}

//  static
PaintInfo PaintInfo::CreateChildPaintInfo(const PaintInfo& parent_paint_info,
                                          const gfx::Rect& bounds,
                                          const gfx::Size& parent_size,
                                          ScaleType scale_type,
                                          bool is_layer,
                                          bool needs_paint) {}

PaintInfo::~PaintInfo() = default;

bool PaintInfo::IsPixelCanvas() const {}

bool PaintInfo::ShouldPaint() const {}

PaintInfo::PaintInfo(const PaintInfo& other)
    :{}

// The root layer should use the ScaleToEnclosingRect, the same logic that
// cc(chrome compositor) is using.
PaintInfo::PaintInfo(const ui::PaintContext& root_context,
                     const gfx::Size& size)
    :{}

PaintInfo::PaintInfo(const PaintInfo& parent_paint_info,
                     const gfx::Rect& bounds,
                     const gfx::Size& parent_size,
                     ScaleType scale_type,
                     bool is_layer,
                     bool needs_paint)
    :{}

gfx::Rect PaintInfo::GetSnappedRecordingBounds(
    const gfx::Size& parent_size,
    const gfx::Rect& child_bounds) const {}

}  // namespace views