apply fixes

This commit is contained in:
gellert 2016-07-27 19:59:01 +02:00
parent 6e1db86a77
commit f90e62a7a5
4 changed files with 16 additions and 27 deletions

View file

@ -12,7 +12,7 @@
#include "base/callback.h"
namespace atom {
typedef base::Callback<void(const gfx::Rect&,int,int,void*)> OnPaintCallback;
class OffScreenOutputDevice : public cc::SoftwareOutputDevice {
@ -20,25 +20,21 @@ public:
typedef base::Callback<void(const gfx::Rect&,int,int,void*)>
OnPaintCallback;
OffScreenOutputDevice(const OnPaintCallback& callback);
OffScreenOutputDevice(bool transparent, const OnPaintCallback& callback);
~OffScreenOutputDevice();
void SetPaintCallback(const OnPaintCallback*);
// void saveSkBitmapToBMPFile(const SkBitmap& skBitmap, const char* path);
void Resize(const gfx::Size& pixel_size, float scale_factor) override;
SkCanvas* BeginPaint(const gfx::Rect& damage_rect) override;
void EndPaint() override;
void OnPaint(const gfx::Rect& damage_rect);
void SetActive(bool active);
void OnPaint(const gfx::Rect& damage_rect);
private:
const bool transparent_;
const OnPaintCallback callback_;
bool active_;
@ -46,8 +42,6 @@ private:
std::unique_ptr<SkCanvas> canvas_;
std::unique_ptr<SkBitmap> bitmap_;
gfx::Rect pending_damage_rect_;
std::unique_ptr<const atom::OnPaintCallback> callback_;
DISALLOW_COPY_AND_ASSIGN(OffScreenOutputDevice);
};