72c9faab45
This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
58 lines
1.7 KiB
C++
58 lines
1.7 KiB
C++
/*
|
|
* Copyright 2012 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef CopyTilesRenderer_DEFINED
|
|
#define CopyTilesRenderer_DEFINED
|
|
|
|
#include "PictureRenderer.h"
|
|
#include "SkTypes.h"
|
|
|
|
class SkPicture;
|
|
class SkString;
|
|
|
|
namespace sk_tools {
|
|
/**
|
|
* PictureRenderer that draws the picture and then extracts it into tiles. For large pictures,
|
|
* it will divide the picture into large tiles and draw the picture once for each large tile.
|
|
*/
|
|
class CopyTilesRenderer : public TiledPictureRenderer {
|
|
|
|
public:
|
|
#if SK_SUPPORT_GPU
|
|
CopyTilesRenderer(const GrContext::Options &opts, int x, int y);
|
|
#else
|
|
CopyTilesRenderer(int x, int y);
|
|
#endif
|
|
virtual void init(const SkPicture* pict,
|
|
const SkString* writePath,
|
|
const SkString* mismatchPath,
|
|
const SkString* inputFilename,
|
|
bool useChecksumBasedFilenames,
|
|
bool useMultiPictureDraw) SK_OVERRIDE;
|
|
|
|
/**
|
|
* Similar to TiledPictureRenderer, this will draw a PNG for each tile. However, the
|
|
* numbering (and actual tiles) will be different.
|
|
*/
|
|
bool render(SkBitmap** out) SK_OVERRIDE;
|
|
|
|
bool supportsTimingIndividualTiles() SK_OVERRIDE { return false; }
|
|
|
|
private:
|
|
int fXTilesPerLargeTile;
|
|
int fYTilesPerLargeTile;
|
|
|
|
int fLargeTileWidth;
|
|
int fLargeTileHeight;
|
|
|
|
SkString getConfigNameInternal() SK_OVERRIDE;
|
|
|
|
typedef TiledPictureRenderer INHERITED;
|
|
};
|
|
} // sk_tools
|
|
#endif // CopyTilesRenderer_DEFINED
|