4353 };
4354
4355
4356
4358 const int step = 0x55;
4359 static_assert(
step * 3 == 255);
4361 for (
int r =
step; r < 256; r +=
step) {
4362 for (
int g =
step; g < 256; g +=
step) {
4365 }
4366 }
4367 }
4368 }
4369
4370 static constexpr float color_filter_matrix_nomtb[] = {
4371 0.0001, 0.0001, 0.0001, 0.9997, 0.0,
4372 0.0001, 0.0001, 0.0001, 0.9997, 0.0,
4373 0.0001, 0.0001, 0.0001, 0.9997, 0.0,
4374 0.0001, 0.0001, 0.0001, 0.9997, 0.0,
4375 };
4376 static constexpr float color_filter_matrix_mtb[] = {
4377 0.0001, 0.0001, 0.0001, 0.9997, 0.0,
4378 0.0001, 0.0001, 0.0001, 0.9997, 0.0,
4379 0.0001, 0.0001, 0.0001, 0.9997, 0.0,
4380 0.0001, 0.0001, 0.0001, 0.9997, 0.1,
4381 };
4386
4389 int x = 0;
4390 for (DlColor color : test_dst_colors) {
4391 SkPaint paint;
4392 paint.setColor(ToSk(color));
4393 paint.setBlendMode(SkBlendMode::kSrc);
4394 canvas->drawRect(SkRect::MakeXYWH(x, 0, 1, 1), paint);
4395 x++;
4396 }
4397 });
4398
4399
4400
4401
4402
4403 int data_count =
test_data->image()->width();
4405 data_count, data_count,
true, [
this, data_count](
SkCanvas* canvas) {
4406 ASSERT_EQ(
test_data->width(), data_count);
4408 for (
int y = 0;
y < data_count;
y++) {
4410 }
4411 });
4413 data_count, data_count,
true, [
this, data_count](
SkCanvas* canvas) {
4414 ASSERT_EQ(
test_data->width(), data_count);
4418 for (
int y = 0;
y < data_count;
y++) {
4420 }
4421 });
4422
4423 for (
int y = 0;
y < data_count;
y++) {
4424 for (
int x = 0;
x < data_count;
x++) {
4427 }
4428 }
4429 }
static int step(int x, SkScalar min, SkScalar max)
void translate(SkScalar dx, SkScalar dy)
void rotate(SkScalar degrees)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static std::shared_ptr< DlColorFilter > Make(const float matrix[20])
std::shared_ptr< DlColorFilter > color_filter_mtb
std::unique_ptr< RenderResult > test_data
std::shared_ptr< DlColorFilter > color_filter_nomtb
std::unique_ptr< RenderResult > test_image_dst_data
std::vector< DlColor > test_dst_colors
std::unique_ptr< RenderResult > test_image_src_data
std::vector< DlColor > test_src_colors
std::unique_ptr< RenderResult > get_output(int w, int h, bool snapshot, const std::function< void(SkCanvas *)> &renderer)
DisplayListRenderingTestBase<::testing::Test > DisplayListRendering
static constexpr DlColor kWhite()
static constexpr DlColor kBlue()
static constexpr DlColor kBlack()
static constexpr DlColor kLightGrey()
constexpr DlColor withAlpha(uint8_t alpha) const
static constexpr DlColor kTransparent()
static constexpr DlColor kRed()
static constexpr DlColor kGreen()
static constexpr DlColor kDarkGrey()
#define EXPECT_TRUE(handle)