| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 | 8 |
| 9 | 9 |
| 10 #include "SkDrawCommand.h" | 10 #include "SkDrawCommand.h" |
| (...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 : INHERITED(DRAW_TEXT_BLOB) | 646 : INHERITED(DRAW_TEXT_BLOB) |
| 647 , fBlob(blob) | 647 , fBlob(blob) |
| 648 , fXPos(x) | 648 , fXPos(x) |
| 649 , fYPos(y) | 649 , fYPos(y) |
| 650 , fPaint(paint) { | 650 , fPaint(paint) { |
| 651 | 651 |
| 652 blob->ref(); | 652 blob->ref(); |
| 653 | 653 |
| 654 // FIXME: push blob info | 654 // FIXME: push blob info |
| 655 fInfo.push(SkObjectParser::ScalarToString(x, "XPOS: ")); | 655 fInfo.push(SkObjectParser::ScalarToString(x, "XPOS: ")); |
| 656 fInfo.push(SkObjectParser::ScalarToString(x, "YPOS: ")); | 656 fInfo.push(SkObjectParser::ScalarToString(y, "YPOS: ")); |
| 657 fInfo.push(SkObjectParser::RectToString(fBlob->bounds(), "Bounds: ")); |
| 657 fInfo.push(SkObjectParser::PaintToString(paint)); | 658 fInfo.push(SkObjectParser::PaintToString(paint)); |
| 658 } | 659 } |
| 659 | 660 |
| 660 void SkDrawTextBlobCommand::execute(SkCanvas* canvas) const { | 661 void SkDrawTextBlobCommand::execute(SkCanvas* canvas) const { |
| 661 canvas->drawTextBlob(fBlob, fXPos, fYPos, fPaint); | 662 canvas->drawTextBlob(fBlob, fXPos, fYPos, fPaint); |
| 662 } | 663 } |
| 663 | 664 |
| 664 bool SkDrawTextBlobCommand::render(SkCanvas* canvas) const { | 665 bool SkDrawTextBlobCommand::render(SkCanvas* canvas) const { |
| 665 canvas->clear(SK_ColorWHITE); | 666 canvas->clear(SK_ColorWHITE); |
| 666 canvas->save(); | 667 canvas->save(); |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 p.setColor(SK_ColorCYAN); | 1018 p.setColor(SK_ColorCYAN); |
| 1018 p.setStyle(SkPaint::kStroke_Style); | 1019 p.setStyle(SkPaint::kStroke_Style); |
| 1019 canvas->drawRect(fCullRect, p); | 1020 canvas->drawRect(fCullRect, p); |
| 1020 } | 1021 } |
| 1021 | 1022 |
| 1022 SkPopCullCommand::SkPopCullCommand() : INHERITED(POP_CULL) { } | 1023 SkPopCullCommand::SkPopCullCommand() : INHERITED(POP_CULL) { } |
| 1023 | 1024 |
| 1024 void SkPopCullCommand::execute(SkCanvas* canvas) const { | 1025 void SkPopCullCommand::execute(SkCanvas* canvas) const { |
| 1025 canvas->popCull(); | 1026 canvas->popCull(); |
| 1026 } | 1027 } |
| OLD | NEW |