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

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

Issue 2064833002: Implement DrawQuad StructTraits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix move constructor Created 4 years, 6 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/texture_draw_quad.h ('k') | components/bitmap_uploader/bitmap_uploader.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_TILE_DRAW_QUAD_H_ 5 #ifndef CC_QUADS_TILE_DRAW_QUAD_H_
6 #define CC_QUADS_TILE_DRAW_QUAD_H_ 6 #define CC_QUADS_TILE_DRAW_QUAD_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "cc/quads/content_draw_quad_base.h" 10 #include "cc/quads/content_draw_quad_base.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 class CC_EXPORT TileDrawQuad : public ContentDrawQuadBase { 14 class CC_EXPORT TileDrawQuad : public ContentDrawQuadBase {
15 public: 15 public:
16 static const size_t kResourceIdIndex = 0;
17
16 TileDrawQuad(); 18 TileDrawQuad();
17 ~TileDrawQuad() override; 19 ~TileDrawQuad() override;
18 20
19 void SetNew(const SharedQuadState* shared_quad_state, 21 void SetNew(const SharedQuadState* shared_quad_state,
20 const gfx::Rect& rect, 22 const gfx::Rect& rect,
21 const gfx::Rect& opaque_rect, 23 const gfx::Rect& opaque_rect,
22 const gfx::Rect& visible_rect, 24 const gfx::Rect& visible_rect,
23 unsigned resource_id, 25 unsigned resource_id,
24 // |tex_coord_rect| contains non-normalized coordinates. 26 // |tex_coord_rect| contains non-normalized coordinates.
25 // TODO(reveman): Make the use of normalized vs non-normalized 27 // TODO(reveman): Make the use of normalized vs non-normalized
(...skipping 15 matching lines...) Expand all
41 const gfx::RectF& tex_coord_rect, 43 const gfx::RectF& tex_coord_rect,
42 const gfx::Size& texture_size, 44 const gfx::Size& texture_size,
43 bool swizzle_contents, 45 bool swizzle_contents,
44 bool nearest_neighbor); 46 bool nearest_neighbor);
45 47
46 static const TileDrawQuad* MaterialCast(const DrawQuad*); 48 static const TileDrawQuad* MaterialCast(const DrawQuad*);
47 49
48 ResourceId resource_id() const { return resources.ids[kResourceIdIndex]; } 50 ResourceId resource_id() const { return resources.ids[kResourceIdIndex]; }
49 51
50 private: 52 private:
51 static const size_t kResourceIdIndex = 0;
52
53 void ExtendValue(base::trace_event::TracedValue* value) const override; 53 void ExtendValue(base::trace_event::TracedValue* value) const override;
54 }; 54 };
55 55
56 } // namespace cc 56 } // namespace cc
57 57
58 #endif // CC_QUADS_TILE_DRAW_QUAD_H_ 58 #endif // CC_QUADS_TILE_DRAW_QUAD_H_
OLDNEW
« no previous file with comments | « cc/quads/texture_draw_quad.h ('k') | components/bitmap_uploader/bitmap_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698