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

Side by Side Diff: cc/picture_layer_impl.cc

Issue 11411050: cc: Make the DrawQuad subclasses into struct-like classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « cc/nine_patch_layer_impl_unittest.cc ('k') | cc/quad_culler.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 #include "cc/picture_layer_impl.h" 5 #include "cc/picture_layer_impl.h"
6 6
7 #include "cc/layer_tree_host_impl.h" 7 #include "cc/layer_tree_host_impl.h"
8 #include "cc/math_util.h" 8 #include "cc/math_util.h"
9 #include "cc/quad_sink.h" 9 #include "cc/quad_sink.h"
10 #include "cc/tile_draw_quad.h" 10 #include "cc/tile_draw_quad.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 gfx::Rect geometry_rect = iter.geometry_rect(); 55 gfx::Rect geometry_rect = iter.geometry_rect();
56 gfx::RectF texture_rect = iter.texture_rect(); 56 gfx::RectF texture_rect = iter.texture_rect();
57 gfx::Rect opaque_rect = iter.opaque_rect(); 57 gfx::Rect opaque_rect = iter.opaque_rect();
58 58
59 bool outside_left_edge = geometry_rect.x() == content_rect.x(); 59 bool outside_left_edge = geometry_rect.x() == content_rect.x();
60 bool outside_top_edge = geometry_rect.y() == content_rect.y(); 60 bool outside_top_edge = geometry_rect.y() == content_rect.y();
61 bool outside_right_edge = geometry_rect.right() == content_rect.right(); 61 bool outside_right_edge = geometry_rect.right() == content_rect.right();
62 bool outside_bottom_edge = geometry_rect.bottom() == content_rect.bottom(); 62 bool outside_bottom_edge = geometry_rect.bottom() == content_rect.bottom();
63 63
64 quadSink.append(TileDrawQuad::create( 64 scoped_ptr<TileDrawQuad> quad = TileDrawQuad::Create();
65 sharedQuadState, 65 quad->SetNew(sharedQuadState,
66 geometry_rect, 66 geometry_rect,
67 opaque_rect, 67 opaque_rect,
68 resource, 68 resource,
69 texture_rect, 69 texture_rect,
70 iter.texture_size(), 70 iter.texture_size(),
71 iter->contents_swizzled(), 71 iter->contents_swizzled(),
72 outside_left_edge && useAA, 72 outside_left_edge && useAA,
73 outside_top_edge && useAA, 73 outside_top_edge && useAA,
74 outside_right_edge && useAA, 74 outside_right_edge && useAA,
75 outside_bottom_edge && useAA).PassAs<DrawQuad>(), appendQuadsData); 75 outside_bottom_edge && useAA);
76 quadSink.append(quad.PassAs<DrawQuad>(), appendQuadsData);
76 } 77 }
77 } 78 }
78 79
79 void PictureLayerImpl::dumpLayerProperties(std::string*, int indent) const { 80 void PictureLayerImpl::dumpLayerProperties(std::string*, int indent) const {
80 // TODO(enne): implement me 81 // TODO(enne): implement me
81 } 82 }
82 83
83 scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling*, 84 scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling*,
84 gfx::Rect rect) { 85 gfx::Rect rect) {
85 // TODO(nduca): where does this come from? 86 // TODO(nduca): where does this come from?
(...skipping 26 matching lines...) Expand all
112 tiling->set_client(this); 113 tiling->set_client(this);
113 tiling->SetBounds(contentBounds()); 114 tiling->SetBounds(contentBounds());
114 tiling->create_tiles(gfx::Rect(gfx::Point(), contentBounds())); 115 tiling->create_tiles(gfx::Rect(gfx::Point(), contentBounds()));
115 tilings_.append(tiling.Pass()); 116 tilings_.append(tiling.Pass());
116 117
117 // TODO(enne): handle invalidations, create new tiles 118 // TODO(enne): handle invalidations, create new tiles
118 } 119 }
119 } 120 }
120 121
121 } // namespace cc 122 } // namespace cc
OLDNEW
« no previous file with comments | « cc/nine_patch_layer_impl_unittest.cc ('k') | cc/quad_culler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698