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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 canvas->flush(); | 349 canvas->flush(); |
350 | 350 |
351 // we pick three colorblind-safe colors, 75% alpha | 351 // we pick three colorblind-safe colors, 75% alpha |
352 static const SkColor kTotalBounds = SkColorSetARGB(0xC0, 0x6A, 0x3D, 0x9
A); | 352 static const SkColor kTotalBounds = SkColorSetARGB(0xC0, 0x6A, 0x3D, 0x9
A); |
353 static const SkColor kOpBatchBounds = SkColorSetARGB(0xC0, 0xE3, 0x1A, 0
x1C); | 353 static const SkColor kOpBatchBounds = SkColorSetARGB(0xC0, 0xE3, 0x1A, 0
x1C); |
354 static const SkColor kOtherBatchBounds = SkColorSetARGB(0xC0, 0xFF, 0x7F
, 0x00); | 354 static const SkColor kOtherBatchBounds = SkColorSetARGB(0xC0, 0xFF, 0x7F
, 0x00); |
355 | 355 |
356 // get the render target of the top device so we can ignore batches draw
n offscreen | 356 // get the render target of the top device so we can ignore batches draw
n offscreen |
357 SkBaseDevice* bd = canvas->getDevice_just_for_deprecated_compatibility_t
esting(); | 357 SkBaseDevice* bd = canvas->getDevice_just_for_deprecated_compatibility_t
esting(); |
358 SkGpuDevice* gbd = reinterpret_cast<SkGpuDevice*>(bd); | 358 SkGpuDevice* gbd = reinterpret_cast<SkGpuDevice*>(bd); |
359 uint32_t rtID = gbd->accessDrawContext()->accessRenderTarget()->getUniqu
eID(); | 359 uint32_t rtID = gbd->accessDrawContext()->accessRenderTarget()->uniqueID
(); |
360 | 360 |
361 // get the bounding boxes to draw | 361 // get the bounding boxes to draw |
362 SkTArray<GrAuditTrail::BatchInfo> childrenBounds; | 362 SkTArray<GrAuditTrail::BatchInfo> childrenBounds; |
363 if (m == -1) { | 363 if (m == -1) { |
364 at->getBoundsByClientID(&childrenBounds, index); | 364 at->getBoundsByClientID(&childrenBounds, index); |
365 } else { | 365 } else { |
366 // the client wants us to draw the mth batch | 366 // the client wants us to draw the mth batch |
367 at->getBoundsByBatchListID(&childrenBounds.push_back(), m); | 367 at->getBoundsByBatchListID(&childrenBounds.push_back(), m); |
368 } | 368 } |
369 SkPaint paint; | 369 SkPaint paint; |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 } | 845 } |
846 | 846 |
847 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { | 847 bool SkDebugCanvas::lastClipStackData(const SkPath& devPath) { |
848 if (fCalledAddStackData) { | 848 if (fCalledAddStackData) { |
849 fClipStackData.appendf("<br>"); | 849 fClipStackData.appendf("<br>"); |
850 addPathData(devPath, "pathOut"); | 850 addPathData(devPath, "pathOut"); |
851 return true; | 851 return true; |
852 } | 852 } |
853 return false; | 853 return false; |
854 } | 854 } |
OLD | NEW |