blob: ee5bf68896a42f2de9a42e36135b1d6f7c571caf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// Copyright (c) 2011 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 CHROME_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_TOUCH_H_
#define CHROME_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_TOUCH_H_
#pragma once
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "ui/gfx/compositor/compositor_gl.h"
// Helper class for storing image data from the GPU process renderered
// on behalf of the RWHVV. It assumes that GL context that will display
// the image data is current when an instance of this object is created
// or destroyed.
class AcceleratedSurfaceContainerTouch : public ui::TextureGL {
public:
AcceleratedSurfaceContainerTouch(ui::CompositorGL* compositor,
const gfx::Size& size,
uint64 surface_handle);
virtual void SetBitmap(const SkBitmap& bitmap,
const gfx::Point& origin,
const gfx::Size& overall_size) OVERRIDE;
virtual void Draw(const ui::Transform& transform) OVERRIDE;
protected:
~AcceleratedSurfaceContainerTouch();
void* image_;
DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerTouch);
};
#endif // CHROME_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_TOUCH_H_
|