Some SkPM4f cleanup

Bug: skia:
Change-Id: I6a06b2ff951b9a1319c40b16b33840e220fecc37
Reviewed-on: https://skia-review.googlesource.com/155900
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This commit is contained in:
Brian Osman 2018-09-20 13:10:49 -04:00 committed by Skia Commit-Bot
parent 0d96a4bc71
commit 1cf418b4d0
12 changed files with 6 additions and 19 deletions

View File

@ -15,7 +15,6 @@
#include "SkImageEncoderPriv.h"
#include "SkJpegEncoder.h"
#include "SkPngEncoder.h"
#include "SkPM4f.h"
#include "SkWebpEncoder.h"
namespace skiagm {

View File

@ -9,7 +9,6 @@
#include "sk_tool_utils.h"
#include "SkBitmap.h"
#include "SkShader.h"
#include "SkPM4f.h"
enum SrcType {
//! A WxH image with a rectangle in the lower right.

View File

@ -12,7 +12,6 @@
#include "SkColorData.h"
#include "SkColorSpaceXformer.h"
#include "SkModeColorFilter.h"
#include "SkPM4f.h"
#include "SkPM4fPriv.h"
#include "SkRandom.h"
#include "SkRasterPipeline.h"

View File

@ -11,7 +11,6 @@
#include "SkLightingShader.h"
#include "SkMatrix.h"
#include "SkNormalSource.h"
#include "SkPM4f.h"
#include "SkReadBuffer.h"
#include "SkWriteBuffer.h"

View File

@ -6,8 +6,6 @@
*/
#include "SkRasterPipeline.h"
#include "SkPM4f.h"
#include "SkPM4fPriv.h"
#include "../jumper/SkJumper.h"
#include <algorithm>

View File

@ -10,7 +10,6 @@
#include "SkMathPriv.h"
#include "SkOnce.h"
#include "SkOpts.h"
#include "SkPM4f.h"
#include "SkRasterPipeline.h"
#include "SkReadBuffer.h"
#include "SkString.h"

View File

@ -6,7 +6,6 @@
*/
#include "SkHighContrastFilter.h"
#include "SkPM4f.h"
#include "SkArenaAlloc.h"
#include "SkRasterPipeline.h"
#include "SkReadBuffer.h"

View File

@ -6,7 +6,6 @@
*/
#include "SkLumaColorFilter.h"
#include "SkPM4f.h"
#include "SkColorData.h"
#include "SkRasterPipeline.h"
#include "SkString.h"

View File

@ -10,7 +10,6 @@
#include "SkArenaAlloc.h"
#include "SkBitmap.h"
#include "SkColorData.h"
#include "SkPM4f.h"
#include "SkRasterPipeline.h"
#include "SkReadBuffer.h"
#include "SkString.h"

View File

@ -10,7 +10,6 @@
#include "SkColorData.h"
#include "SkColorSpacePriv.h"
#include "SkGeometry.h"
#include "SkPM4f.h"
#include "SkTo.h"
namespace {

View File

@ -15,7 +15,6 @@
#include "SkFlattenablePriv.h"
#include "SkMaskFilter.h"
#include "SkPath.h"
#include "SkPM4f.h"
#include "SkRandom.h"
#include "SkRasterPipeline.h"
#include "SkResourceCache.h"

View File

@ -5,7 +5,6 @@
* found in the LICENSE file.
*/
#include "SkPM4f.h"
#include "SkRasterPipeline.h"
#include "SkTypes.h"
#include "Test.h"
@ -38,7 +37,7 @@ DEF_TEST(sk_pipeline_srgb_roundtrip, r) {
DEF_TEST(sk_pipeline_srgb_edge_cases, r) {
// We need to run at least 4 pixels to make sure we hit all specializations.
SkPM4f colors[4] = { {{0,1,1,1}}, {{0,0,0,0}}, {{0,0,0,0}}, {{0,0,0,0}} };
float colors[4][4] = { {0,1,1,1}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} };
auto& color = colors[0];
SkJumper_MemoryCtx dst = { &color, 0 };
@ -50,13 +49,13 @@ DEF_TEST(sk_pipeline_srgb_edge_cases, r) {
p.append(SkRasterPipeline::store_f32, &dst);
p.run(0,0,4,1);
if (color.r() != 0.0f) {
ERRORF(r, "expected to_srgb() to map 0.0f to 0.0f, got %f", color.r());
if (color[0] != 0.0f) {
ERRORF(r, "expected to_srgb() to map 0.0f to 0.0f, got %f", color[0]);
}
if (color.g() != 1.0f) {
float f = color.g();
if (color[1] != 1.0f) {
float f = color[1];
uint32_t x;
memcpy(&x, &f, 4);
ERRORF(r, "expected to_srgb() to map 1.0f to 1.0f, got %f (%08x)", color.g(), x);
ERRORF(r, "expected to_srgb() to map 1.0f to 1.0f, got %f (%08x)", color[1], x);
}
}