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

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

Issue 21159007: cc: Adding support for RGBA_4444 tile textures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed a signed vs. unsigned comparison in video_resource_updater.cc Created 7 years, 3 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/quads/content_draw_quad_base.h" 11 #include "cc/quads/content_draw_quad_base.h"
12 #include "cc/resources/picture_pile_impl.h" 12 #include "cc/resources/picture_pile_impl.h"
13 #include "ui/gfx/rect.h" 13 #include "ui/gfx/rect.h"
14 #include "ui/gfx/rect_f.h" 14 #include "ui/gfx/rect_f.h"
15 #include "ui/gfx/size.h" 15 #include "ui/gfx/size.h"
16 16
17 namespace cc { 17 namespace cc {
18 18
19 // Used for on-demand tile rasterization. 19 // Used for on-demand tile rasterization.
20 class CC_EXPORT PictureDrawQuad : public ContentDrawQuadBase { 20 class CC_EXPORT PictureDrawQuad : public ContentDrawQuadBase {
21 public: 21 public:
22 static scoped_ptr<PictureDrawQuad> Create(); 22 static scoped_ptr<PictureDrawQuad> Create();
23 virtual ~PictureDrawQuad(); 23 virtual ~PictureDrawQuad();
24 24
25 void SetNew(const SharedQuadState* shared_quad_state, 25 void SetNew(const SharedQuadState* shared_quad_state,
26 gfx::Rect rect, 26 gfx::Rect rect,
27 gfx::Rect opaque_rect, 27 gfx::Rect opaque_rect,
28 const gfx::RectF& tex_coord_rect, 28 const gfx::RectF& tex_coord_rect,
29 gfx::Size texture_size, 29 gfx::Size texture_size,
30 bool swizzle_contents, 30 ResourceFormat texture_format,
31 gfx::Rect content_rect, 31 gfx::Rect content_rect,
32 float contents_scale, 32 float contents_scale,
33 bool can_draw_direct_to_backbuffer, 33 bool can_draw_direct_to_backbuffer,
34 scoped_refptr<PicturePileImpl> picture_pile); 34 scoped_refptr<PicturePileImpl> picture_pile);
35 35
36 void SetAll(const SharedQuadState* shared_quad_state, 36 void SetAll(const SharedQuadState* shared_quad_state,
37 gfx::Rect rect, 37 gfx::Rect rect,
38 gfx::Rect opaque_rect, 38 gfx::Rect opaque_rect,
39 gfx::Rect visible_rect, 39 gfx::Rect visible_rect,
40 bool needs_blending, 40 bool needs_blending,
41 const gfx::RectF& tex_coord_rect, 41 const gfx::RectF& tex_coord_rect,
42 gfx::Size texture_size, 42 gfx::Size texture_size,
43 bool swizzle_contents, 43 ResourceFormat texture_format,
44 gfx::Rect content_rect, 44 gfx::Rect content_rect,
45 float contents_scale, 45 float contents_scale,
46 bool can_draw_direct_to_backbuffer, 46 bool can_draw_direct_to_backbuffer,
47 scoped_refptr<PicturePileImpl> picture_pile); 47 scoped_refptr<PicturePileImpl> picture_pile);
48 48
49 gfx::Rect content_rect; 49 gfx::Rect content_rect;
50 float contents_scale; 50 float contents_scale;
51 bool can_draw_direct_to_backbuffer; 51 bool can_draw_direct_to_backbuffer;
52 scoped_refptr<PicturePileImpl> picture_pile; 52 scoped_refptr<PicturePileImpl> picture_pile;
53 ResourceFormat texture_format;
53 54
54 virtual void IterateResources(const ResourceIteratorCallback& callback) 55 virtual void IterateResources(const ResourceIteratorCallback& callback)
55 OVERRIDE; 56 OVERRIDE;
56 57
57 static const PictureDrawQuad* MaterialCast(const DrawQuad* quad); 58 static const PictureDrawQuad* MaterialCast(const DrawQuad* quad);
58 59
59 private: 60 private:
60 PictureDrawQuad(); 61 PictureDrawQuad();
61 virtual void ExtendValue(base::DictionaryValue* value) const OVERRIDE; 62 virtual void ExtendValue(base::DictionaryValue* value) const OVERRIDE;
62 }; 63 };
63 64
64 } // namespace cc 65 } // namespace cc
65 66
66 #endif // CC_QUADS_PICTURE_DRAW_QUAD_H_ 67 #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