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

Side by Side Diff: tests/ReadPixelsTest.cpp

Issue 301283003: Revert "Revert of setConfig -> setInfo (https://codereview.chromium.org/308683005/)" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add guard for android Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « tests/PipeTest.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "SkBitmapDevice.h" 8 #include "SkBitmapDevice.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 rowBytes = (info.width() + 16) * sizeof(SkPMColor); 231 rowBytes = (info.width() + 16) * sizeof(SkPMColor);
232 break; 232 break;
233 default: 233 default:
234 SkASSERT(0); 234 SkASSERT(0);
235 break; 235 break;
236 } 236 }
237 237
238 if (alloc) { 238 if (alloc) {
239 bitmap->allocPixels(info); 239 bitmap->allocPixels(info);
240 } else { 240 } else {
241 bitmap->setConfig(info, rowBytes); 241 bitmap->setInfo(info, rowBytes);
242 } 242 }
243 } 243 }
244 244
245 DEF_GPUTEST(ReadPixels, reporter, factory) { 245 DEF_GPUTEST(ReadPixels, reporter, factory) {
246 const SkIRect testRects[] = { 246 const SkIRect testRects[] = {
247 // entire thing 247 // entire thing
248 DEV_RECT, 248 DEV_RECT,
249 // larger on all sides 249 // larger on all sides
250 SkIRect::MakeLTRB(-10, -10, DEV_W + 10, DEV_H + 10), 250 SkIRect::MakeLTRB(-10, -10, DEV_W + 10, DEV_H + 10),
251 // fully contained 251 // fully contained
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 checkRead(reporter, wkbmp, clippedRect.fLeft, 386 checkRead(reporter, wkbmp, clippedRect.fLeft,
387 clippedRect.fTop, true, false); 387 clippedRect.fTop, true, false);
388 } else { 388 } else {
389 REPORTER_ASSERT(reporter, !success); 389 REPORTER_ASSERT(reporter, !success);
390 } 390 }
391 } 391 }
392 } 392 }
393 } 393 }
394 } 394 }
395 } 395 }
OLDNEW
« no previous file with comments | « tests/PipeTest.cpp ('k') | tests/SerializationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698