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

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

Issue 12642010: Implement on demand quad rasterization for PicturePiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase. Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/quads/picture_draw_quad.h ('k') | cc/quads/tile_draw_quad.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "cc/quads/picture_draw_quad.h"
6
7 namespace cc {
8
9 PictureDrawQuad::PictureDrawQuad() {
10 }
11
12 PictureDrawQuad::~PictureDrawQuad() {
13 }
14
15 scoped_ptr<PictureDrawQuad> PictureDrawQuad::Create() {
16 return make_scoped_ptr(new PictureDrawQuad);
17 }
18
19 void PictureDrawQuad::SetNew(const SharedQuadState* shared_quad_state,
20 gfx::Rect rect,
21 gfx::Rect opaque_rect,
22 const gfx::RectF& tex_coord_rect,
23 gfx::Size texture_size,
24 bool swizzle_contents,
25 gfx::Rect content_rect,
26 float contents_scale,
27 scoped_refptr<PicturePileImpl> picture_pile) {
28 ContentDrawQuadBase::SetNew(shared_quad_state, DrawQuad::PICTURE_CONTENT,
29 rect, opaque_rect, tex_coord_rect, texture_size,
30 swizzle_contents);
31 this->content_rect = content_rect;
32 this->contents_scale = contents_scale;
33 this->picture_pile = picture_pile;
34 }
35
36 void PictureDrawQuad::SetAll(const SharedQuadState* shared_quad_state,
37 gfx::Rect rect,
38 gfx::Rect opaque_rect,
39 gfx::Rect visible_rect,
40 bool needs_blending,
41 const gfx::RectF& tex_coord_rect,
42 gfx::Size texture_size,
43 bool swizzle_contents,
44 gfx::Rect content_rect,
45 float contents_scale,
46 scoped_refptr<PicturePileImpl> picture_pile) {
47 ContentDrawQuadBase::SetAll(shared_quad_state,
48 DrawQuad::PICTURE_CONTENT, rect, opaque_rect,
49 visible_rect, needs_blending, tex_coord_rect,
50 texture_size, swizzle_contents);
51 this->content_rect = content_rect;
52 this->contents_scale = contents_scale;
53 this->picture_pile = picture_pile;
54 }
55
56 void PictureDrawQuad::IterateResources(
57 const ResourceIteratorCallback& callback) {
58 // TODO(danakj): Convert to TextureDrawQuad?
59 NOTIMPLEMENTED();
60 }
61
62 const PictureDrawQuad* PictureDrawQuad::MaterialCast(const DrawQuad* quad) {
63 DCHECK(quad->material == DrawQuad::PICTURE_CONTENT);
64 return static_cast<const PictureDrawQuad*>(quad);
65 }
66
67 } // namespace cc
OLDNEW
« no previous file with comments | « cc/quads/picture_draw_quad.h ('k') | cc/quads/tile_draw_quad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698