| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 | 8 |
| 9 #include "Test.h" | 9 #include "Test.h" |
| 10 // This is a GR test | 10 // This is a GR test |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 desc.fFlags = kRenderTarget_GrTextureFlagBit; | 51 desc.fFlags = kRenderTarget_GrTextureFlagBit; |
| 52 desc.fConfig = kAlpha_8_GrPixelConfig; | 52 desc.fConfig = kAlpha_8_GrPixelConfig; |
| 53 desc.fWidth = kXSize; | 53 desc.fWidth = kXSize; |
| 54 desc.fHeight = kYSize; | 54 desc.fHeight = kYSize; |
| 55 | 55 |
| 56 GrTexture* texture = context->createUncachedTexture(desc, NULL, 0); | 56 GrTexture* texture = context->createUncachedTexture(desc, NULL, 0); |
| 57 if (!texture) { | 57 if (!texture) { |
| 58 return; | 58 return; |
| 59 } | 59 } |
| 60 | 60 |
| 61 GrAutoUnref au(texture); | 61 SkAutoUnref au(texture); |
| 62 | 62 |
| 63 SkIRect intScreen = SkIRect::MakeWH(kXSize, kYSize); | 63 SkIRect intScreen = SkIRect::MakeWH(kXSize, kYSize); |
| 64 SkRect screen; | 64 SkRect screen; |
| 65 | 65 |
| 66 screen = SkRect::MakeWH(SkIntToScalar(kXSize), | 66 screen = SkRect::MakeWH(SkIntToScalar(kXSize), |
| 67 SkIntToScalar(kYSize)); | 67 SkIntToScalar(kYSize)); |
| 68 | 68 |
| 69 SkRect clipRect(screen); | 69 SkRect clipRect(screen); |
| 70 clipRect.outset(10, 10); | 70 clipRect.outset(10, 10); |
| 71 | 71 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 test_cache(reporter, context); | 234 test_cache(reporter, context); |
| 235 test_clip_bounds(reporter, context); | 235 test_clip_bounds(reporter, context); |
| 236 } | 236 } |
| 237 } | 237 } |
| 238 | 238 |
| 239 //////////////////////////////////////////////////////////////////////////////// | 239 //////////////////////////////////////////////////////////////////////////////// |
| 240 #include "TestClassDef.h" | 240 #include "TestClassDef.h" |
| 241 DEFINE_GPUTESTCLASS("ClipCache", ClipCacheTestClass, TestClipCache) | 241 DEFINE_GPUTESTCLASS("ClipCache", ClipCacheTestClass, TestClipCache) |
| 242 | 242 |
| 243 #endif | 243 #endif |
| OLD | NEW |