| 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 #include "SkCanvasPriv.h" | 8 #include "SkCanvasPriv.h" |
| 9 #include "SkClipStack.h" | 9 #include "SkClipStack.h" |
| 10 #include "SkDebugCanvas.h" | 10 #include "SkDebugCanvas.h" |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 canvas->flush(); | 338 canvas->flush(); |
| 339 | 339 |
| 340 // we pick three colorblind-safe colors, 75% alpha | 340 // we pick three colorblind-safe colors, 75% alpha |
| 341 static const SkColor kTotalBounds = SkColorSetARGB(0xC0, 0x6A, 0x3D, 0x9
A); | 341 static const SkColor kTotalBounds = SkColorSetARGB(0xC0, 0x6A, 0x3D, 0x9
A); |
| 342 static const SkColor kOpBatchBounds = SkColorSetARGB(0xC0, 0xE3, 0x1A, 0
x1C); | 342 static const SkColor kOpBatchBounds = SkColorSetARGB(0xC0, 0xE3, 0x1A, 0
x1C); |
| 343 static const SkColor kOtherBatchBounds = SkColorSetARGB(0xC0, 0xFF, 0x7F
, 0x00); | 343 static const SkColor kOtherBatchBounds = SkColorSetARGB(0xC0, 0xFF, 0x7F
, 0x00); |
| 344 | 344 |
| 345 // get the render target of the top device so we can ignore batches draw
n offscreen | 345 // get the render target of the top device so we can ignore batches draw
n offscreen |
| 346 SkBaseDevice* bd = canvas->getDevice_just_for_deprecated_compatibility_t
esting(); | 346 SkBaseDevice* bd = canvas->getDevice_just_for_deprecated_compatibility_t
esting(); |
| 347 SkGpuDevice* gbd = reinterpret_cast<SkGpuDevice*>(bd); | 347 SkGpuDevice* gbd = reinterpret_cast<SkGpuDevice*>(bd); |
| 348 uint32_t rtID = gbd->accessRenderTarget()->getUniqueID(); | 348 uint32_t rtID = gbd->accessDrawContext()->accessRenderTarget()->getUniqu
eID(); |
| 349 | 349 |
| 350 // get the bounding boxes to draw | 350 // get the bounding boxes to draw |
| 351 SkTArray<GrAuditTrail::BatchInfo> childrenBounds; | 351 SkTArray<GrAuditTrail::BatchInfo> childrenBounds; |
| 352 if (m == -1) { | 352 if (m == -1) { |
| 353 at->getBoundsByClientID(&childrenBounds, index); | 353 at->getBoundsByClientID(&childrenBounds, index); |
| 354 } else { | 354 } else { |
| 355 // the client wants us to draw the mth batch | 355 // the client wants us to draw the mth batch |
| 356 at->getBoundsByBatchListID(&childrenBounds.push_back(), m); | 356 at->getBoundsByBatchListID(&childrenBounds.push_back(), m); |
| 357 } | 357 } |
| 358 SkPaint paint; | 358 SkPaint paint; |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 } | 817 } |
| 818 | 818 |
| 819 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { | 819 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { |
| 820 if (fCalledAddStackData) { | 820 if (fCalledAddStackData) { |
| 821 fClipStackData.appendf("<br>"); | 821 fClipStackData.appendf("<br>"); |
| 822 addPathData(devPath, "pathOut"); | 822 addPathData(devPath, "pathOut"); |
| 823 return true; | 823 return true; |
| 824 } | 824 } |
| 825 return false; | 825 return false; |
| 826 } | 826 } |
| OLD | NEW |