Flutter Engine
The Flutter Engine
GoldenImage.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_TESTING_SCENARIO_APP_IOS_SCENARIOS_SCENARIOSUITESTS_GOLDENIMAGE_H_
6#define FLUTTER_TESTING_SCENARIO_APP_IOS_SCENARIOS_SCENARIOSUITESTS_GOLDENIMAGE_H_
7
8#import <UIKit/UIKit.h>
9
11
12@interface GoldenImage : NSObject
13
14@property(readonly, copy, nonatomic) NSString* goldenName;
15@property(readonly, strong, nonatomic) UIImage* image;
16
17// Initilize with the golden file's prefix.
18//
19// Create an image from a golden file named prefix+devicemodel.
20- (instancetype)initWithGoldenNamePrefix:(NSString*)prefix;
21
22// Compare this GoldenImage to `image`.
23//
24// Return YES if the `image` of this GoldenImage have the same pixels of provided `image`.
25- (BOOL)compareGoldenToImage:(UIImage*)image rmesThreshold:(double)rmesThreshold;
26
27@end
28
30
31#endif // FLUTTER_TESTING_SCENARIO_APP_IOS_SCENARIOS_SCENARIOSUITESTS_GOLDENIMAGE_H_
#define NS_ASSUME_NONNULL_BEGIN
Definition: FlutterMacros.h:19
#define NS_ASSUME_NONNULL_END
Definition: FlutterMacros.h:20
static void copy(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
Definition: SkSwizzler.cpp:31
UIImage * image
Definition: GoldenImage.h:15
NSString * goldenName
Definition: GoldenImage.h:14
int BOOL
Definition: windows_types.h:37