diff options
author | leandrogracia@chromium.org <leandrogracia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-27 17:43:16 +0000 |
---|---|---|
committer | leandrogracia@chromium.org <leandrogracia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-27 17:43:16 +0000 |
commit | 9ee4d3a2fdc6accd37343d148e5c5149c1b7d045 (patch) | |
tree | aaf3ae0b3ec39f4c361e05a96af2856d0365ccea /cc/quads/picture_draw_quad.h | |
parent | 22b332e314c574e899c34c4e9ef3dbcbaea5582e (diff) | |
download | chromium_src-9ee4d3a2fdc6accd37343d148e5c5149c1b7d045.zip chromium_src-9ee4d3a2fdc6accd37343d148e5c5149c1b7d045.tar.gz chromium_src-9ee4d3a2fdc6accd37343d148e5c5149c1b7d045.tar.bz2 |
Implement on demand quad rasterization for PicturePiles.
BUG=173011
Review URL: https://chromiumcodereview.appspot.com/12642010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190969 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/quads/picture_draw_quad.h')
-rw-r--r-- | cc/quads/picture_draw_quad.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/cc/quads/picture_draw_quad.h b/cc/quads/picture_draw_quad.h new file mode 100644 index 0000000..847c4f8a --- /dev/null +++ b/cc/quads/picture_draw_quad.h @@ -0,0 +1,62 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CC_QUADS_PICTURE_DRAW_QUAD_H_ +#define CC_QUADS_PICTURE_DRAW_QUAD_H_ + +#include "base/memory/ref_counted.h" +#include "base/memory/scoped_ptr.h" +#include "cc/base/cc_export.h" +#include "cc/quads/content_draw_quad_base.h" +#include "cc/resources/picture_pile_impl.h" +#include "ui/gfx/rect.h" +#include "ui/gfx/rect_f.h" +#include "ui/gfx/size.h" + +namespace cc { + +// Used for on-demand tile rasterization. +class CC_EXPORT PictureDrawQuad : public ContentDrawQuadBase { + public: + static scoped_ptr<PictureDrawQuad> Create(); + virtual ~PictureDrawQuad(); + + void SetNew(const SharedQuadState* shared_quad_state, + gfx::Rect rect, + gfx::Rect opaque_rect, + const gfx::RectF& tex_coord_rect, + gfx::Size texture_size, + bool swizzle_contents, + gfx::Rect content_rect, + float contents_scale, + scoped_refptr<PicturePileImpl> picture_pile); + + void SetAll(const SharedQuadState* shared_quad_state, + gfx::Rect rect, + gfx::Rect opaque_rect, + gfx::Rect visible_rect, + bool needs_blending, + const gfx::RectF& tex_coord_rect, + gfx::Size texture_size, + bool swizzle_contents, + gfx::Rect content_rect, + float contents_scale, + scoped_refptr<PicturePileImpl> picture_pile); + + gfx::Rect content_rect; + float contents_scale; + scoped_refptr<PicturePileImpl> picture_pile; + + virtual void IterateResources(const ResourceIteratorCallback& callback) + OVERRIDE; + + static const PictureDrawQuad* MaterialCast(const DrawQuad* quad); + + private: + PictureDrawQuad(); +}; + +} + +#endif // CC_QUADS_PICTURE_DRAW_QUAD_H_ |