diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-31 20:52:25 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-31 20:52:25 +0000 |
commit | f809d3bb86532d666d6094497b5b7f93f3b32a9e (patch) | |
tree | e37a05eb364b08446fbdd4a11e77a79eabf48d02 /cc/texture_uploader.h | |
parent | d388fe22c8c1c6e80c990be37fe067634bfed7a9 (diff) | |
download | chromium_src-f809d3bb86532d666d6094497b5b7f93f3b32a9e.zip chromium_src-f809d3bb86532d666d6094497b5b7f93f3b32a9e.tar.gz chromium_src-f809d3bb86532d666d6094497b5b7f93f3b32a9e.tar.bz2 |
Use gfx:: Geometry types for the resource provider and layer updater classes.
This depends on the gfx::Vector2d class from https://codereview.chromium.org/11269022/
Covered by existing tests, just changing data types.
BUG=147395
R=enne
Review URL: https://codereview.chromium.org/11266030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165225 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/texture_uploader.h')
-rw-r--r-- | cc/texture_uploader.h | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/cc/texture_uploader.h b/cc/texture_uploader.h index c317f05..f2a964d 100644 --- a/cc/texture_uploader.h +++ b/cc/texture_uploader.h @@ -5,7 +5,6 @@ #ifndef CC_TEXTURE_UPLOADER_H_ #define CC_TEXTURE_UPLOADER_H_ -#include "IntRect.h" #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "cc/scoped_ptr_deque.h" @@ -16,6 +15,12 @@ namespace WebKit { class WebGraphicsContext3D; } +namespace gfx { +class Rect; +class Size; +class Vector2d; +} + namespace cc { class TextureUploader { @@ -35,12 +40,12 @@ public: // imageRect, expressed in the same coordinate system as imageRect. Let // image be a buffer for imageRect. This function will copy the region // corresponding to sourceRect to destOffset in this sub-image. - void upload(const uint8_t* image, - const IntRect& content_rect, - const IntRect& source_rect, - const IntSize& dest_offset, + void upload(const uint8* image, + const gfx::Rect& content_rect, + const gfx::Rect& source_rect, + const gfx::Vector2d& dest_offset, GLenum format, - IntSize size); + const gfx::Size& size); private: class Query { @@ -73,15 +78,15 @@ private: void endQuery(); void processQueries(); - void uploadWithTexSubImage(const uint8_t* image, - const IntRect& image_rect, - const IntRect& source_rect, - const IntSize& dest_offset, + void uploadWithTexSubImage(const uint8* image, + const gfx::Rect& image_rect, + const gfx::Rect& source_rect, + const gfx::Vector2d& dest_offset, GLenum format); - void uploadWithMapTexSubImage(const uint8_t* image, - const IntRect& image_rect, - const IntRect& source_rect, - const IntSize& dest_offset, + void uploadWithMapTexSubImage(const uint8* image, + const gfx::Rect& image_rect, + const gfx::Rect& source_rect, + const gfx::Vector2d& dest_offset, GLenum format); WebKit::WebGraphicsContext3D* m_context; @@ -92,7 +97,7 @@ private: bool m_useMapTexSubImage; size_t m_subImageSize; - scoped_array<uint8_t> m_subImage; + scoped_array<uint8> m_subImage; DISALLOW_COPY_AND_ASSIGN(TextureUploader); }; |