OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_TOUCH_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_TOUCH_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_TOUCH_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_TOUCH_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "ui/gfx/compositor/compositor_gl.h" | 10 #include "ui/gfx/compositor/compositor_gl.h" |
11 | 11 |
12 // Helper class for storing image data from the GPU process renderered | 12 // Helper class for storing image data from the GPU process renderered |
13 // on behalf of the RWHVV. It assumes that GL context that will display | 13 // on behalf of the RWHVV. It assumes that GL context that will display |
14 // the image data is current when an instance of this object is created | 14 // the image data is current when an instance of this object is created |
15 // or destroyed. | 15 // or destroyed. |
16 class AcceleratedSurfaceContainerTouch : public ui::TextureGL { | 16 class AcceleratedSurfaceContainerTouch : public ui::TextureGL { |
17 public: | 17 public: |
18 static AcceleratedSurfaceContainerTouch* CreateAcceleratedSurfaceContainer( | 18 static AcceleratedSurfaceContainerTouch* CreateAcceleratedSurfaceContainer( |
19 ui::CompositorGL* compositor, | |
20 const gfx::Size& size, | 19 const gfx::Size& size, |
21 uint64 surface_handle); | 20 uint64 surface_handle); |
22 | 21 |
23 // TextureGL implementation | 22 // TextureGL implementation |
24 virtual void SetCanvas(const SkCanvas& canvas, | 23 virtual void SetCanvas(const SkCanvas& canvas, |
25 const gfx::Point& origin, | 24 const gfx::Point& origin, |
26 const gfx::Size& overall_size) OVERRIDE; | 25 const gfx::Size& overall_size) OVERRIDE; |
27 | 26 |
28 protected: | 27 protected: |
29 AcceleratedSurfaceContainerTouch( | 28 explicit AcceleratedSurfaceContainerTouch(const gfx::Size& size); |
30 ui::CompositorGL* compositor, | |
31 const gfx::Size& size); | |
32 | 29 |
33 private: | 30 private: |
34 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerTouch); | 31 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerTouch); |
35 }; | 32 }; |
36 | 33 |
37 #endif // CHROME_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_TOUCH_H_ | 34 #endif // CHROME_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_TOUCH_H_ |
OLD | NEW |