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

Side by Side Diff: gm/optimizations.cpp

Issue 129373002: Disable optimizations GM for 565 targets. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: refer to bug Created 6 years, 11 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
« no previous file with comments | « no previous file | no next file » | 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 2013 Google Inc. 2 * Copyright 2013 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 "gm.h" 8 #include "gm.h"
9 #include "SkDebugCanvas.h" 9 #include "SkDebugCanvas.h"
10 #include "SkPictureFlat.h" 10 #include "SkPictureFlat.h"
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 // test 303 // test
304 class OptimizationsGM : public skiagm::GM { 304 class OptimizationsGM : public skiagm::GM {
305 public: 305 public:
306 OptimizationsGM() { 306 OptimizationsGM() {
307 this->makeCheckerboard(); 307 this->makeCheckerboard();
308 } 308 }
309 309
310 static const int kWidth = 800; 310 static const int kWidth = 800;
311 static const int kHeight = 800; 311 static const int kHeight = 800;
312 312
313 protected: 313 protected:
robertphillips 2014/01/09 12:53:30 add virtual prefix?
mtklein 2014/01/09 13:08:48 Happy to add it, but now that I'm thinking about i
314 uint32_t onGetFlags() const SK_OVERRIDE {
315 // One optimization changes the color drawn slightly in a 565 target.
316 // We've decided it's innocuous, so we disable this GM when targeting 56 5.
317 // Revisit this if we get finer-grained control: it'd be nice to keep dr awing directly.
318 // For more, see skia:1994.
319 return skiagm::GM::kSkip565_Flag;
320 }
321
314 SkString onShortName() { 322 SkString onShortName() {
315 return SkString("optimizations"); 323 return SkString("optimizations");
316 } 324 }
317 325
318 SkISize onISize() { return SkISize::Make(kWidth, kHeight); } 326 SkISize onISize() { return SkISize::Make(kWidth, kHeight); }
319 327
320 typedef SkPicture* (*PFCreateOpt)(SkTDArray<DrawType> *preOptPattern, 328 typedef SkPicture* (*PFCreateOpt)(SkTDArray<DrawType> *preOptPattern,
321 SkTDArray<DrawType> *postOptPattern, 329 SkTDArray<DrawType> *postOptPattern,
322 const SkBitmap& checkerBoard); 330 const SkBitmap& checkerBoard);
323 331
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 } 414 }
407 415
408 SkBitmap fCheckerboard; 416 SkBitmap fCheckerboard;
409 417
410 typedef skiagm::GM INHERITED; 418 typedef skiagm::GM INHERITED;
411 }; 419 };
412 420
413 ////////////////////////////////////////////////////////////////////////////// 421 //////////////////////////////////////////////////////////////////////////////
414 422
415 DEF_GM( return new OptimizationsGM; ) 423 DEF_GM( return new OptimizationsGM; )
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698