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

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

Issue 1380653003: Mac Overlays: Allow SolidColor and Tile quads to be candidates for overlays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@AllOrNothing2
Patch Set: Plumb allow_overlay 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
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 "cc/quads/content_draw_quad_base.h" 8 #include "cc/quads/content_draw_quad_base.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 class CC_EXPORT TileDrawQuad : public ContentDrawQuadBase { 12 class CC_EXPORT TileDrawQuad : public ContentDrawQuadBase {
13 public: 13 public:
14 TileDrawQuad(); 14 TileDrawQuad();
15 ~TileDrawQuad() override; 15 ~TileDrawQuad() override;
16 16
17 void SetNew(const SharedQuadState* shared_quad_state, 17 void SetNew(const SharedQuadState* shared_quad_state,
18 const gfx::Rect& rect, 18 const gfx::Rect& rect,
19 const gfx::Rect& opaque_rect, 19 const gfx::Rect& opaque_rect,
20 const gfx::Rect& visible_rect, 20 const gfx::Rect& visible_rect,
21 unsigned resource_id, 21 unsigned resource_id,
22 // |tex_coord_rect| contains non-normalized coordinates. 22 // |tex_coord_rect| contains non-normalized coordinates.
23 // TODO(reveman): Make the use of normalized vs non-normalized 23 // TODO(reveman): Make the use of normalized vs non-normalized
24 // coordinates consistent across all quad types: crbug.com/487370 24 // coordinates consistent across all quad types: crbug.com/487370
25 const gfx::RectF& tex_coord_rect, 25 const gfx::RectF& tex_coord_rect,
26 const gfx::Size& texture_size, 26 const gfx::Size& texture_size,
27 bool swizzle_contents, 27 bool swizzle_contents,
28 bool nearest_neighbor); 28 bool nearest_neighbor,
29 bool allow_overlay);
29 30
30 void SetAll(const SharedQuadState* shared_quad_state, 31 void SetAll(const SharedQuadState* shared_quad_state,
31 const gfx::Rect& rect, 32 const gfx::Rect& rect,
32 const gfx::Rect& opaque_rect, 33 const gfx::Rect& opaque_rect,
33 const gfx::Rect& visible_rect, 34 const gfx::Rect& visible_rect,
34 bool needs_blending, 35 bool needs_blending,
35 unsigned resource_id, 36 unsigned resource_id,
36 // |tex_coord_rect| contains non-normalized coordinates. 37 // |tex_coord_rect| contains non-normalized coordinates.
37 // TODO(reveman): Make the use of normalized vs non-normalized 38 // TODO(reveman): Make the use of normalized vs non-normalized
38 // coordinates consistent across all quad types: crbug.com/487370 39 // coordinates consistent across all quad types: crbug.com/487370
39 const gfx::RectF& tex_coord_rect, 40 const gfx::RectF& tex_coord_rect,
40 const gfx::Size& texture_size, 41 const gfx::Size& texture_size,
41 bool swizzle_contents, 42 bool swizzle_contents,
42 bool nearest_neighbor); 43 bool nearest_neighbor,
44 bool allow_overlay);
43 45
44 static const TileDrawQuad* MaterialCast(const DrawQuad*); 46 static const TileDrawQuad* MaterialCast(const DrawQuad*);
45 47
46 ResourceId resource_id() const { return resources.ids[kResourceIdIndex]; } 48 ResourceId resource_id() const { return resources.ids[kResourceIdIndex]; }
47 49
48 private: 50 private:
49 static const size_t kResourceIdIndex = 0; 51 static const size_t kResourceIdIndex = 0;
50 52
51 void ExtendValue(base::trace_event::TracedValue* value) const override; 53 void ExtendValue(base::trace_event::TracedValue* value) const override;
52 }; 54 };
53 55
54 } // namespace cc 56 } // namespace cc
55 57
56 #endif // CC_QUADS_TILE_DRAW_QUAD_H_ 58 #endif // CC_QUADS_TILE_DRAW_QUAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698