2011-07-28 14:26:00 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright 2011 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
2011-06-17 18:31:01 +00:00
|
|
|
#include "SkView.h"
|
|
|
|
#include "SkColor.h"
|
|
|
|
#include "SkBitmap.h"
|
|
|
|
|
|
|
|
/*
|
2012-08-23 18:14:13 +00:00
|
|
|
* Pipe Reader with File IO. This view reads from the data file produced by the
|
|
|
|
* Pipe Writer.
|
2011-06-17 18:31:01 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
class ReaderView : public SkView {
|
|
|
|
public:
|
|
|
|
ReaderView();
|
|
|
|
virtual void draw(SkCanvas* canvas);
|
2012-08-23 18:14:13 +00:00
|
|
|
|
2011-06-17 18:31:01 +00:00
|
|
|
private:
|
|
|
|
int fFilePos;
|
|
|
|
int fFront;
|
|
|
|
int fBack;
|
|
|
|
SkColor fBGColor;
|
|
|
|
SkBitmap fBufferBitmaps[2];
|
|
|
|
typedef SkView INHERITED;
|
|
|
|
};
|