зеркало из https://github.com/mozilla/moz-skia.git
Fixing Windows compiler complaints
http://codereview.appspot.com/5991056/ git-svn-id: http://skia.googlecode.com/svn/trunk@3626 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
419400bf6e
Коммит
09042b80d2
|
@ -18,8 +18,8 @@ class InterpBench : public SkBenchmark {
|
|||
public:
|
||||
InterpBench(void* param, const char name[]) : INHERITED(param) {
|
||||
fName.printf("interp_%s", name);
|
||||
fFx = 3.3;
|
||||
fDx = 0.1257;
|
||||
fFx = 3.3f;
|
||||
fDx = 0.1257f;
|
||||
}
|
||||
|
||||
virtual void performTest(int16_t dst[], float x, float dx, int count) = 0;
|
||||
|
|
1
gm/gm.h
1
gm/gm.h
|
@ -12,7 +12,6 @@
|
|||
#include "SkCanvas.h"
|
||||
#include "SkDevice.h"
|
||||
#include "SkPaint.h"
|
||||
#include "SkRefCnt.h"
|
||||
#include "SkSize.h"
|
||||
#include "SkString.h"
|
||||
#include "SkTRegistry.h"
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "gl/SkDebugGLContext.h"
|
||||
#include "SkPicture.h"
|
||||
#include "SkStream.h"
|
||||
#include "SkRefCnt.h"
|
||||
|
||||
static bool gForceBWtext;
|
||||
|
||||
|
|
|
@ -237,9 +237,9 @@ protected:
|
|||
center.set(SkIntToScalar(dim.width())/2, SkIntToScalar(dim.height())/2);
|
||||
SkScalar radius = SkIntToScalar(dim.width())/2;
|
||||
const SkColor colors[] = { 0x7f7f7f7f, 0x7f7f7f7f, 0xb2000000 };
|
||||
const SkScalar pos[] = { SkFloatToScalar(0.0),
|
||||
SkFloatToScalar(0.35),
|
||||
SkFloatToScalar(1.0) };
|
||||
const SkScalar pos[] = { SkFloatToScalar(0.0f),
|
||||
SkFloatToScalar(0.35f),
|
||||
SkFloatToScalar(1.0f) };
|
||||
SkShader* shader =
|
||||
SkGradientShader::CreateRadial(center, radius, colors,
|
||||
pos, SK_ARRAY_COUNT(pos),
|
||||
|
|
|
@ -79,7 +79,7 @@ public:
|
|||
* @param height height of rectangle to write in pixels.
|
||||
* @param config the pixel config of the source buffer
|
||||
* @param buffer memory to read pixels from
|
||||
* @param rowBytes number of bytes bewtween consecutive rows. Zero
|
||||
* @param rowBytes number of bytes between consecutive rows. Zero
|
||||
* means rows are tightly packed.
|
||||
*/
|
||||
void writePixels(int left, int top, int width, int height,
|
||||
|
|
|
@ -104,7 +104,7 @@ protected:
|
|||
SkAutoCanvasRestore acr(canvas, true);
|
||||
canvas->translate(SkIntToScalar(50 + i * 230),
|
||||
SkIntToScalar(20));
|
||||
rotate_about(canvas, i * 5, x, y * 10);
|
||||
rotate_about(canvas, SkIntToScalar(i * 5), x, y * 10);
|
||||
|
||||
{
|
||||
SkPaint p;
|
||||
|
|
|
@ -146,7 +146,7 @@ protected:
|
|||
fEnd[kPrevX] = -lr;
|
||||
fEnd[kPrevY] = -ud;
|
||||
fEnd[kNextX] = fEnd[kNextY] = 0;
|
||||
SkScalar blend[] = {0.8, 0.0, 0.0, 1.0};
|
||||
SkScalar blend[] = {0.8f, 0.0f, 0.0f, 1.0f};
|
||||
fInterp.setKeyFrame(0, SkTime::GetMSecs(), fBegin, blend);
|
||||
fInterp.setKeyFrame(1, SkTime::GetMSecs()+500, fEnd, blend);
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
#include "SkDeviceProfile.h"
|
||||
|
||||
#define DEFAULT_GAMMAEXP 2.2
|
||||
#define DEFAULT_CONTRASTSCALE 0.5
|
||||
#define DEFAULT_GAMMAEXP 2.2f
|
||||
#define DEFAULT_CONTRASTSCALE 0.5f
|
||||
#define DEFAULT_LCDCONFIG SkDeviceProfile::kNone_LCDConfig
|
||||
#define DEFAULT_FONTHINTLEVEL SkDeviceProfile::kSlight_FontHintLevel
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ static void test_common_angles(skiatest::Reporter* reporter) {
|
|||
// Test precision of rotation in common cases
|
||||
int common_angles[] = { 0, 90, -90, 180, -180, 270, -270, 360, -360 };
|
||||
for (int i = 0; i < 9; ++i) {
|
||||
rot.setRotateDegreesAbout(0, 0, -1, common_angles[i]);
|
||||
rot.setRotateDegreesAbout(0, 0, -1, SkIntToScalar(common_angles[i]));
|
||||
|
||||
SkMatrix rot3x3 = rot;
|
||||
REPORTER_ASSERT(reporter, rot3x3.rectStaysRect());
|
||||
|
|
|
@ -162,7 +162,7 @@ static void stroke_tiny_cubic() {
|
|||
|
||||
static void check_close(skiatest::Reporter* reporter, const SkPath& path) {
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
SkPath::Iter iter(path, (bool)i);
|
||||
SkPath::Iter iter(path, SkToBool(i));
|
||||
SkPoint mv;
|
||||
SkPoint pts[4];
|
||||
SkPath::Verb v;
|
||||
|
@ -943,7 +943,6 @@ static void test_raw_iter(skiatest::Reporter* reporter) {
|
|||
do {
|
||||
nextVerb = static_cast<SkPath::Verb>((rand.nextU() >> 16) % SkPath::kDone_Verb);
|
||||
} while (lastWasClose && nextVerb == SkPath::kClose_Verb);
|
||||
int numRequiredPts;
|
||||
switch (nextVerb) {
|
||||
case SkPath::kMove_Verb:
|
||||
expectedPts[numPoints] = randomPts[(rand.nextU() >> 16) % 25];
|
||||
|
|
Загрузка…
Ссылка в новой задаче