Add @VisibleForTesting to fix ChromePublic release build.
[chromium-blink-merge.git] / cc / quads / picture_draw_quad.h
blob243a2f9d174c2c3ea44b953a60816b471a399489
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_QUADS_PICTURE_DRAW_QUAD_H_
6 #define CC_QUADS_PICTURE_DRAW_QUAD_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h"
11 #include "cc/playback/raster_source.h"
12 #include "cc/quads/content_draw_quad_base.h"
13 #include "ui/gfx/geometry/rect.h"
14 #include "ui/gfx/geometry/rect_f.h"
15 #include "ui/gfx/geometry/size.h"
17 namespace cc {
19 // Used for on-demand tile rasterization.
20 class CC_EXPORT PictureDrawQuad : public ContentDrawQuadBase {
21 public:
22 PictureDrawQuad();
23 ~PictureDrawQuad() override;
25 void SetNew(const SharedQuadState* shared_quad_state,
26 const gfx::Rect& rect,
27 const gfx::Rect& opaque_rect,
28 const gfx::Rect& visible_rect,
29 const gfx::RectF& tex_coord_rect,
30 const gfx::Size& texture_size,
31 bool nearest_neighbor,
32 ResourceFormat texture_format,
33 const gfx::Rect& content_rect,
34 float contents_scale,
35 scoped_refptr<RasterSource> raster_source);
37 void SetAll(const SharedQuadState* shared_quad_state,
38 const gfx::Rect& rect,
39 const gfx::Rect& opaque_rect,
40 const gfx::Rect& visible_rect,
41 bool needs_blending,
42 const gfx::RectF& tex_coord_rect,
43 const gfx::Size& texture_size,
44 bool nearest_neighbor,
45 ResourceFormat texture_format,
46 const gfx::Rect& content_rect,
47 float contents_scale,
48 scoped_refptr<RasterSource> raster_source);
50 gfx::Rect content_rect;
51 float contents_scale;
52 scoped_refptr<RasterSource> raster_source;
53 ResourceFormat texture_format;
55 void IterateResources(const ResourceIteratorCallback& callback) override;
57 static const PictureDrawQuad* MaterialCast(const DrawQuad* quad);
59 private:
60 void ExtendValue(base::trace_event::TracedValue* value) const override;
63 } // namespace cc
65 #endif // CC_QUADS_PICTURE_DRAW_QUAD_H_