Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(593)

Side by Side Diff: core/fxge/skia/fx_skia_device_unittest.cpp

Issue 2111553003: fix skia unit tests (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix luminosity device bitmap depth Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/fxge/include/fx_ge.h" 5 #include "core/fxge/include/fx_ge.h"
6 #include "core/fxge/skia/fx_skia_device.h" 6 #include "core/fxge/skia/fx_skia_device.h"
7 #include "fpdfsdk/include/fsdk_define.h" 7 #include "fpdfsdk/include/fsdk_define.h"
8 #include "public/fpdfview.h" 8 #include "public/fpdfview.h"
9 #include "testing/fx_string_testhelpers.h" 9 #include "testing/fx_string_testhelpers.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 14 matching lines...) Expand all
25 uint32_t m_pixel; 25 uint32_t m_pixel;
26 }; 26 };
27 27
28 void EmptyTest(CFX_SkiaDeviceDriver* driver, const State&) { 28 void EmptyTest(CFX_SkiaDeviceDriver* driver, const State&) {
29 driver->SaveState(); 29 driver->SaveState();
30 driver->RestoreState(true); 30 driver->RestoreState(true);
31 driver->RestoreState(false); 31 driver->RestoreState(false);
32 } 32 }
33 33
34 void CommonTest(CFX_SkiaDeviceDriver* driver, const State& state) { 34 void CommonTest(CFX_SkiaDeviceDriver* driver, const State& state) {
35 FXTEXT_CHARPOS charPos[] = {1, 0, 1, 4, false, {0, 0, 0, 0}, false}; 35 FXTEXT_CHARPOS charPos[] = {{1, 0, 1, 4, false, {0, 0, 0, 0}, false}};
36 CFX_Font font; 36 CFX_Font font;
37 FX_FLOAT fontSize = 1; 37 FX_FLOAT fontSize = 1;
38 CFX_FontCache cache; 38 CFX_FontCache cache;
39 CFX_PathData clipPath, clipPath2; 39 CFX_PathData clipPath, clipPath2;
40 clipPath.AppendRect(0, 0, 3, 1); 40 clipPath.AppendRect(0, 0, 3, 1);
41 clipPath2.AppendRect(0, 0, 2, 1); 41 clipPath2.AppendRect(0, 0, 2, 1);
42 CFX_Matrix clipMatrix; 42 CFX_Matrix clipMatrix;
43 CFX_Matrix clipMatrix2(1, 0, 0, 1, 0, 1); 43 CFX_Matrix clipMatrix2(1, 0, 0, 1, 0, 1);
44 driver->SaveState(); 44 driver->SaveState();
45 CFX_PathData path1; 45 CFX_PathData path1;
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 Harness(&CommonTest, 155 Harness(&CommonTest,
156 {State::Change::kNo, State::Save::kYes, State::Clip::kDifferentMatrix, 156 {State::Change::kNo, State::Save::kYes, State::Clip::kDifferentMatrix,
157 State::Graphic::kText, 0xFF445566}); 157 State::Graphic::kText, 0xFF445566});
158 Harness(&CommonTest, {State::Change::kNo, State::Save::kYes, 158 Harness(&CommonTest, {State::Change::kNo, State::Save::kYes,
159 State::Clip::kSame, State::Graphic::kText, 0xFF445566}); 159 State::Clip::kSame, State::Graphic::kText, 0xFF445566});
160 } 160 }
161 161
162 TEST(fxge, SkiaStateOOSClip) { 162 TEST(fxge, SkiaStateOOSClip) {
163 Harness(&OutOfSequenceClipTest, {}); 163 Harness(&OutOfSequenceClipTest, {});
164 } 164 }
OLDNEW
« core/fxge/skia/fx_skia_device.cpp ('K') | « core/fxge/skia/fx_skia_device.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698