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

Side by Side Diff: tests/WritePixelsTest.cpp

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Test.h" 8 #include "Test.h"
9 #include "SkBitmapDevice.h" 9 #include "SkBitmapDevice.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 }; 290 };
291 291
292 struct CanvasConfig { 292 struct CanvasConfig {
293 DevType fDevType; 293 DevType fDevType;
294 bool fTightRowBytes; 294 bool fTightRowBytes;
295 }; 295 };
296 296
297 static const CanvasConfig gCanvasConfigs[] = { 297 static const CanvasConfig gCanvasConfigs[] = {
298 {kRaster_DevType, true}, 298 {kRaster_DevType, true},
299 {kRaster_DevType, false}, 299 {kRaster_DevType, false},
300 #if SK_SUPPORT_GPU && defined(SK_SCALAR_IS_FLOAT) 300 #if SK_SUPPORT_GPU
301 {kGpu_BottomLeft_DevType, true}, // row bytes has no meaning on gpu devices 301 {kGpu_BottomLeft_DevType, true}, // row bytes has no meaning on gpu devices
302 {kGpu_TopLeft_DevType, true}, // row bytes has no meaning on gpu devices 302 {kGpu_TopLeft_DevType, true}, // row bytes has no meaning on gpu devices
303 #endif 303 #endif
304 }; 304 };
305 305
306 static SkBaseDevice* createDevice(const CanvasConfig& c, GrContext* grCtx) { 306 static SkBaseDevice* createDevice(const CanvasConfig& c, GrContext* grCtx) {
307 switch (c.fDevType) { 307 switch (c.fDevType) {
308 case kRaster_DevType: { 308 case kRaster_DevType: {
309 SkBitmap bmp; 309 SkBitmap bmp;
310 size_t rowBytes = c.fTightRowBytes ? 0 : 4 * DEV_W + 100; 310 size_t rowBytes = c.fTightRowBytes ? 0 : 4 * DEV_W + 100;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 REPORTER_ASSERT(reporter, intersects == (idBefore != idA fter)); 465 REPORTER_ASSERT(reporter, intersects == (idBefore != idA fter));
466 } 466 }
467 } 467 }
468 } 468 }
469 } 469 }
470 } 470 }
471 } 471 }
472 472
473 #include "TestClassDef.h" 473 #include "TestClassDef.h"
474 DEFINE_GPUTESTCLASS("WritePixels", WritePixelsTestClass, WritePixelsTest) 474 DEFINE_GPUTESTCLASS("WritePixels", WritePixelsTestClass, WritePixelsTest)
OLDNEW
« src/core/SkCanvas.cpp ('K') | « tests/StringTest.cpp ('k') | tests/skia_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698