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

Side by Side Diff: cc/quads/picture_draw_quad.h

Issue 1405883002: cc: Remove the base RasterSource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge more Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « cc/quads/draw_quad_unittest.cc ('k') | cc/quads/picture_draw_quad.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_QUADS_PICTURE_DRAW_QUAD_H_ 5 #ifndef CC_QUADS_PICTURE_DRAW_QUAD_H_
6 #define CC_QUADS_PICTURE_DRAW_QUAD_H_ 6 #define CC_QUADS_PICTURE_DRAW_QUAD_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
11 #include "cc/playback/raster_source.h" 11 #include "cc/playback/display_list_raster_source.h"
12 #include "cc/quads/content_draw_quad_base.h" 12 #include "cc/quads/content_draw_quad_base.h"
13 #include "cc/resources/resource_provider.h" 13 #include "cc/resources/resource_provider.h"
14 #include "ui/gfx/geometry/rect.h" 14 #include "ui/gfx/geometry/rect.h"
15 #include "ui/gfx/geometry/rect_f.h" 15 #include "ui/gfx/geometry/rect_f.h"
16 #include "ui/gfx/geometry/size.h" 16 #include "ui/gfx/geometry/size.h"
17 17
18 namespace cc { 18 namespace cc {
19 19
20 // Used for on-demand tile rasterization. 20 // Used for on-demand tile rasterization.
21 class CC_EXPORT PictureDrawQuad : public ContentDrawQuadBase { 21 class CC_EXPORT PictureDrawQuad : public ContentDrawQuadBase {
22 public: 22 public:
23 PictureDrawQuad(); 23 PictureDrawQuad();
24 ~PictureDrawQuad() override; 24 ~PictureDrawQuad() override;
25 25
26 void SetNew(const SharedQuadState* shared_quad_state, 26 void SetNew(const SharedQuadState* shared_quad_state,
27 const gfx::Rect& rect, 27 const gfx::Rect& rect,
28 const gfx::Rect& opaque_rect, 28 const gfx::Rect& opaque_rect,
29 const gfx::Rect& visible_rect, 29 const gfx::Rect& visible_rect,
30 const gfx::RectF& tex_coord_rect, 30 const gfx::RectF& tex_coord_rect,
31 const gfx::Size& texture_size, 31 const gfx::Size& texture_size,
32 bool nearest_neighbor, 32 bool nearest_neighbor,
33 ResourceFormat texture_format, 33 ResourceFormat texture_format,
34 const gfx::Rect& content_rect, 34 const gfx::Rect& content_rect,
35 float contents_scale, 35 float contents_scale,
36 scoped_refptr<RasterSource> raster_source); 36 scoped_refptr<DisplayListRasterSource> raster_source);
37 37
38 void SetAll(const SharedQuadState* shared_quad_state, 38 void SetAll(const SharedQuadState* shared_quad_state,
39 const gfx::Rect& rect, 39 const gfx::Rect& rect,
40 const gfx::Rect& opaque_rect, 40 const gfx::Rect& opaque_rect,
41 const gfx::Rect& visible_rect, 41 const gfx::Rect& visible_rect,
42 bool needs_blending, 42 bool needs_blending,
43 const gfx::RectF& tex_coord_rect, 43 const gfx::RectF& tex_coord_rect,
44 const gfx::Size& texture_size, 44 const gfx::Size& texture_size,
45 bool nearest_neighbor, 45 bool nearest_neighbor,
46 ResourceFormat texture_format, 46 ResourceFormat texture_format,
47 const gfx::Rect& content_rect, 47 const gfx::Rect& content_rect,
48 float contents_scale, 48 float contents_scale,
49 scoped_refptr<RasterSource> raster_source); 49 scoped_refptr<DisplayListRasterSource> raster_source);
50 50
51 gfx::Rect content_rect; 51 gfx::Rect content_rect;
52 float contents_scale; 52 float contents_scale;
53 scoped_refptr<RasterSource> raster_source; 53 scoped_refptr<DisplayListRasterSource> raster_source;
54 ResourceFormat texture_format; 54 ResourceFormat texture_format;
55 55
56 static const PictureDrawQuad* MaterialCast(const DrawQuad* quad); 56 static const PictureDrawQuad* MaterialCast(const DrawQuad* quad);
57 57
58 private: 58 private:
59 void ExtendValue(base::trace_event::TracedValue* value) const override; 59 void ExtendValue(base::trace_event::TracedValue* value) const override;
60 }; 60 };
61 61
62 } // namespace cc 62 } // namespace cc
63 63
64 #endif // CC_QUADS_PICTURE_DRAW_QUAD_H_ 64 #endif // CC_QUADS_PICTURE_DRAW_QUAD_H_
OLDNEW
« no previous file with comments | « cc/quads/draw_quad_unittest.cc ('k') | cc/quads/picture_draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698