Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Unified Diff: core/cross/cairo/texture_cairo.h

Issue 2825074: Initial version rendering 2D path for O3D. This will eventually allow O3D app... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/o3d/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/cross/cairo/renderer_cairo.cc ('k') | core/cross/cairo/texture_cairo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/cross/cairo/texture_cairo.h
===================================================================
--- core/cross/cairo/texture_cairo.h (revision 57528)
+++ core/cross/cairo/texture_cairo.h (working copy)
@@ -42,6 +42,21 @@
class RendererCairo;
+struct TextureResource {
+ // Current Frame Data Source
+ const void* data;
+ // X coordinate
+ unsigned left;
+ // Y coordinate
+ unsigned top;
+ // Current Frame Source Width
+ unsigned width;
+ // Current Frame Source Height
+ unsigned height;
+ // Current Frame Source Pitch
+ int pitch;
+};
+
// Texture2DCairo implements the Texture2D interface.
class TextureCairo : public Texture2D {
public:
@@ -68,6 +83,8 @@
const void* src_data,
int src_pitch);
+ virtual TextureResource* GetResource();
+
// Gets a RGBASwizzleIndices that contains a mapping from
// RGBA to the internal format used by the rendering API.
virtual const RGBASwizzleIndices& GetABGR32FSwizzleIndices();
@@ -86,9 +103,12 @@
// Returns the implementation-specific texture handle for this texture.
virtual void* GetTextureHandle() const;
- // The 2d renderer object to be used by client
+ // The 2d renderer object to be used by client.
RendererCairo* renderer_;
+ // Texture Resource for this particular instance.
+ TextureResource resource_;
+
private:
// Initializes the Texture2D.
TextureCairo(ServiceLocator* service_locator,
« no previous file with comments | « core/cross/cairo/renderer_cairo.cc ('k') | core/cross/cairo/texture_cairo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698