Chromium Code Reviews| 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 #include "ui/gfx/surface/transport_dib.h" | |
| 11 | 12 |
| 12 // Helper class for storing image data from the GPU process renderered | 13 // 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 | 14 // 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 | 15 // the image data is current when an instance of this object is created |
| 15 // or destroyed. | 16 // or destroyed. |
| 16 class AcceleratedSurfaceContainerTouch : public ui::TextureGL { | 17 class AcceleratedSurfaceContainerTouch : public ui::TextureGL { |
| 17 public: | 18 public: |
| 18 static AcceleratedSurfaceContainerTouch* CreateAcceleratedSurfaceContainer( | 19 static AcceleratedSurfaceContainerTouch* CreateAcceleratedSurfaceContainer( |
| 19 const gfx::Size& size, | 20 const gfx::Size& size); |
| 20 uint64 surface_handle); | |
| 21 | 21 |
| 22 // TextureGL implementation | 22 // TextureGL implementation |
| 23 virtual void SetCanvas(const SkCanvas& canvas, | 23 virtual void SetCanvas(const SkCanvas& canvas, |
| 24 const gfx::Point& origin, | 24 const gfx::Point& origin, |
| 25 const gfx::Size& overall_size) OVERRIDE; | 25 const gfx::Size& overall_size) OVERRIDE; |
| 26 | 26 |
| 27 // Initialize the surface container, and returns an ID for it. | |
| 28 // The |surface_id| given to this function may be modified, and the returned | |
|
sky
2011/09/21 21:39:55
This sentence looks wrong. The return value is a b
| |
| 29 // value should be used to identify the object. | |
| 30 virtual bool Initialize(uint64 *surface_id) = 0; | |
|
sky
2011/09/21 21:39:55
'uint64 *surface_id' -> 'uint64* surface_id'
| |
| 31 | |
| 32 // Some implementations of this class use shared memory, this the handle | |
|
sky
2011/09/21 21:39:55
'this the' -> 'this is the' ?
| |
| 33 // to the shared buffer, which is part of the surface container. | |
| 34 virtual TransportDIB::Handle handle() const; | |
|
sky
2011/09/21 21:39:55
Don't use unix_hacker_style for virtual methods.
| |
| 35 | |
| 27 protected: | 36 protected: |
| 28 explicit AcceleratedSurfaceContainerTouch(const gfx::Size& size); | 37 explicit AcceleratedSurfaceContainerTouch(const gfx::Size& size); |
| 29 | 38 |
| 30 private: | 39 private: |
| 31 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerTouch); | 40 DISALLOW_COPY_AND_ASSIGN(AcceleratedSurfaceContainerTouch); |
| 32 }; | 41 }; |
| 33 | 42 |
| 34 #endif // CHROME_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_TOUCH_H_ | 43 #endif // CHROME_BROWSER_RENDERER_HOST_ACCELERATED_SURFACE_CONTAINER_TOUCH_H_ |
| OLD | NEW |