From f809d3bb86532d666d6094497b5b7f93f3b32a9e Mon Sep 17 00:00:00 2001 From: "danakj@chromium.org" Date: Wed, 31 Oct 2012 20:52:25 +0000 Subject: 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 --- cc/texture_uploader.h | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'cc/texture_uploader.h') 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 m_subImage; + scoped_array m_subImage; DISALLOW_COPY_AND_ASSIGN(TextureUploader); }; -- cgit v1.1