chromium/components/viz/test/gl_scaler_test_util.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/viz/test/gl_scaler_test_util.h"

#include <algorithm>
#include <cmath>
#include <ostream>

#include "base/check_op.h"
#include "base/notreached.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkImageInfo.h"
#include "ui/gfx/geometry/rect.h"

namespace viz {

ColorBar;

// static
SkBitmap GLScalerTestUtil::AllocateRGBABitmap(const gfx::Size& size) {}

// static
uint8_t GLScalerTestUtil::ToClamped255(float value) {}

// static
std::vector<ColorBar> GLScalerTestUtil::GetScaledSMPTEColorBars(
    const gfx::Size& size) {}

// static
SkBitmap GLScalerTestUtil::CreateSMPTETestImage(const gfx::Size& size) {}

// static
bool GLScalerTestUtil::LooksLikeSMPTETestImage(const SkBitmap& image,
                                               const gfx::Size& src_size,
                                               const gfx::Rect& src_rect,
                                               int fuzzy_pixels,
                                               float* max_color_diff) {}

// static
SkBitmap GLScalerTestUtil::CreateCyclicalTestImage(
    const gfx::Size& size,
    CyclicalPattern pattern,
    const std::vector<SkColor4f>& cycle,
    size_t rotation) {}

// static
gfx::ColorSpace GLScalerTestUtil::DefaultRGBColorSpace() {}

// static
gfx::ColorSpace GLScalerTestUtil::DefaultYUVColorSpace() {}

// static
void GLScalerTestUtil::ConvertRGBABitmapToYUV(SkBitmap* image) {}

// static
SkBitmap GLScalerTestUtil::CopyAndConvertToRGBA(const SkBitmap& bitmap) {}

// static
void GLScalerTestUtil::SwizzleBitmap(SkBitmap* image) {}

// static
SkBitmap GLScalerTestUtil::CreatePackedPlanarBitmap(const SkBitmap& source,
                                                    int channel) {}

// static
void GLScalerTestUtil::UnpackPlanarBitmap(const SkBitmap& plane,
                                          int channel,
                                          SkBitmap* out) {}

// static
void GLScalerTestUtil::UnpackUVBitmap(const SkBitmap& plane, SkBitmap* out) {}

// static
SkBitmap GLScalerTestUtil::CreateVerticallyFlippedBitmap(
    const SkBitmap& source) {}

// The area and color of the bars in a 1920x1080 HD SMPTE color bars test image
// (https://commons.wikimedia.org/wiki/File:SMPTE_Color_Bars_16x9.svg). The gray
// linear gradient bar is defined as half solid 0-level black and half solid
// full-intensity white).
const ColorBar GLScalerTestUtil::kSMPTEColorBars[30] =;

constexpr gfx::Size GLScalerTestUtil::kSMPTEFullSize;

GLScalerTestTextureHelper::GLScalerTestTextureHelper(
    gpu::gles2::GLES2Interface* gl)
    :{}

GLScalerTestTextureHelper::~GLScalerTestTextureHelper() {}

GLuint GLScalerTestTextureHelper::CreateTexture(const gfx::Size& size) {}

GLuint GLScalerTestTextureHelper::UploadTexture(const SkBitmap& bitmap) {}

SkBitmap GLScalerTestTextureHelper::DownloadTexture(GLuint texture,
                                                    const gfx::Size& size) {}

}  // namespace viz