Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkGradientShader.h" | 10 #include "SkGradientShader.h" |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 38 virtual SkString onShortName() SK_OVERRIDE { | 38 virtual SkString onShortName() SK_OVERRIDE { |
| 39 SkString str; | 39 SkString str; |
| 40 str.printf("bitmaprect_%s", fUseIRect ? "i" : "s"); | 40 str.printf("bitmaprect_%s", fUseIRect ? "i" : "s"); |
| 41 return str; | 41 return str; |
| 42 } | 42 } |
| 43 | 43 |
| 44 virtual SkISize onISize() SK_OVERRIDE { | 44 virtual SkISize onISize() SK_OVERRIDE { |
| 45 return SkISize::Make(640, 480); | 45 return SkISize::Make(640, 480); |
| 46 } | 46 } |
| 47 | 47 |
| 48 #ifdef SK_CPU_ARM64 | |
| 49 // Skip tiled drawing on 64-bit ARM until https://skbug.com/2908 is fixed. | |
| 50 virtual uint32_t onGetFlags() const SK_OVERRIDE { | |
| 51 return this->INHERITED::onGetFlags() | GM::kSkipTiled_Flag; | |
|
mtklein
2014/09/03 20:24:13
Seems fine, but all these can just be
return kSki
| |
| 52 } | |
| 53 #endif | |
| 54 | |
| 48 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 55 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
| 49 canvas->drawColor(0xFFCCCCCC); | 56 canvas->drawColor(0xFFCCCCCC); |
| 50 | 57 |
| 51 const SkIRect src[] = { | 58 const SkIRect src[] = { |
| 52 { 0, 0, 32, 32 }, | 59 { 0, 0, 32, 32 }, |
| 53 { 0, 0, 80, 80 }, | 60 { 0, 0, 80, 80 }, |
| 54 { 32, 32, 96, 96 }, | 61 { 32, 32, 96, 96 }, |
| 55 { -32, -32, 32, 32, } | 62 { -32, -32, 32, 32, } |
| 56 }; | 63 }; |
| 57 | 64 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 240 | 247 |
| 241 static skiagm::GMRegistry reg0(MyFactory0); | 248 static skiagm::GMRegistry reg0(MyFactory0); |
| 242 static skiagm::GMRegistry reg1(MyFactory1); | 249 static skiagm::GMRegistry reg1(MyFactory1); |
| 243 | 250 |
| 244 static skiagm::GMRegistry reg2(MyFactory2); | 251 static skiagm::GMRegistry reg2(MyFactory2); |
| 245 | 252 |
| 246 #ifndef SK_BUILD_FOR_ANDROID | 253 #ifndef SK_BUILD_FOR_ANDROID |
| 247 static skiagm::GMRegistry reg3(MyFactory3); | 254 static skiagm::GMRegistry reg3(MyFactory3); |
| 248 static skiagm::GMRegistry reg4(MyFactory4); | 255 static skiagm::GMRegistry reg4(MyFactory4); |
| 249 #endif | 256 #endif |
| OLD | NEW |