flutter_flutter/sky/shell/gpu_delegate.h
Adam Barth 795df1327b Plumb physical size along with SkPicture
Previously we were using the cull rect of the SkPicture to size the GPU buffer,
but Skia is too smart and shrinkwraps the cull rect, which meant we weren't
sizing the GPU buffer to the right size.

Fixes #814
2015-08-26 09:26:51 -07:00

31 lines
753 B
C++

// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_SHELL_GPU_DELEGATE_H_
#define SKY_SHELL_GPU_DELEGATE_H_
#include "sky/engine/wtf/PassRefPtr.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/native_widget_types.h"
class SkPicture;
namespace sky {
namespace shell {
class GPUDelegate {
public:
virtual void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) = 0;
virtual void OnOutputSurfaceDestroyed() = 0;
virtual void Draw(PassRefPtr<SkPicture> picture, gfx::Size size) = 0;
protected:
virtual ~GPUDelegate();
};
} // namespace shell
} // namespace sky
#endif // SKY_SHELL_GPU_DELEGATE_H_