Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1164)

Unified Diff: src/pipe/utils/SamplePipeControllers.cpp

Issue 6303055: Add a tiled pipe mode to SampleApp. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 12 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pipe/utils/SamplePipeControllers.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pipe/utils/SamplePipeControllers.cpp
===================================================================
--- src/pipe/utils/SamplePipeControllers.cpp (revision 4199)
+++ src/pipe/utils/SamplePipeControllers.cpp (working copy)
@@ -6,9 +6,11 @@
*/
#include "SamplePipeControllers.h"
+
#include "SkCanvas.h"
#include "SkDevice.h"
#include "SkGPipe.h"
+#include "SkMatrix.h"
PipeController::PipeController(SkCanvas* target)
:fReader(target) {
@@ -37,7 +39,8 @@
////////////////////////////////////////////////////////////////////////////////
-TiledPipeController::TiledPipeController(const SkBitmap& bitmap)
+TiledPipeController::TiledPipeController(const SkBitmap& bitmap,
+ const SkMatrix* initial)
: INHERITED(NULL) {
int32_t top = 0;
int32_t bottom;
@@ -53,6 +56,9 @@
SkDevice* device = new SkDevice(fBitmaps[i]);
SkCanvas* canvas = new SkCanvas(device);
device->unref();
+ if (initial != NULL) {
+ canvas->setMatrix(*initial);
+ }
canvas->translate(SkIntToScalar(-rect.left()),
SkIntToScalar(-rect.top()));
if (0 == i) {
« no previous file with comments | « src/pipe/utils/SamplePipeControllers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b