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

Side by Side Diff: cc/draw_quad.cc

Issue 11649005: cc: Support anti-aliasing for solid color layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and add DrawQuad::AntiAliasing struct. Created 7 years, 11 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
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/draw_quad.h" 5 #include "cc/draw_quad.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "cc/checkerboard_draw_quad.h" 8 #include "cc/checkerboard_draw_quad.h"
9 #include "cc/debug_border_draw_quad.h" 9 #include "cc/debug_border_draw_quad.h"
10 #include "cc/io_surface_draw_quad.h" 10 #include "cc/io_surface_draw_quad.h"
(...skipping 18 matching lines...) Expand all
29 : shared_quad_state(), 29 : shared_quad_state(),
30 material(INVALID), 30 material(INVALID),
31 needs_blending(false) { 31 needs_blending(false) {
32 } 32 }
33 33
34 void DrawQuad::SetAll(const SharedQuadState* shared_quad_state, 34 void DrawQuad::SetAll(const SharedQuadState* shared_quad_state,
35 Material material, 35 Material material,
36 gfx::Rect rect, 36 gfx::Rect rect,
37 gfx::Rect opaque_rect, 37 gfx::Rect opaque_rect,
38 gfx::Rect visible_rect, 38 gfx::Rect visible_rect,
39 bool needs_blending) { 39 bool needs_blending,
40 AntiAliasing anti_aliasing) {
40 this->material = material; 41 this->material = material;
41 this->rect = rect; 42 this->rect = rect;
42 this->opaque_rect = opaque_rect; 43 this->opaque_rect = opaque_rect;
43 this->visible_rect = visible_rect; 44 this->visible_rect = visible_rect;
44 this->needs_blending = needs_blending; 45 this->needs_blending = needs_blending;
46 this->anti_aliasing = anti_aliasing;
45 this->shared_quad_state = shared_quad_state; 47 this->shared_quad_state = shared_quad_state;
46 48
47 DCHECK(shared_quad_state); 49 DCHECK(shared_quad_state);
48 DCHECK(material != INVALID); 50 DCHECK(material != INVALID);
49 } 51 }
50 52
51 DrawQuad::~DrawQuad() { 53 DrawQuad::~DrawQuad() {
52 } 54 }
53 55
54 scoped_ptr<DrawQuad> DrawQuad::Copy( 56 scoped_ptr<DrawQuad> DrawQuad::Copy(
(...skipping 28 matching lines...) Expand all
83 case RENDER_PASS: // RenderPass quads have their own copy() method. 85 case RENDER_PASS: // RenderPass quads have their own copy() method.
84 case INVALID: 86 case INVALID:
85 LOG(FATAL) << "Invalid DrawQuad material " << material; 87 LOG(FATAL) << "Invalid DrawQuad material " << material;
86 break; 88 break;
87 } 89 }
88 copy_quad->shared_quad_state = copied_shared_quad_state; 90 copy_quad->shared_quad_state = copied_shared_quad_state;
89 return copy_quad.Pass(); 91 return copy_quad.Pass();
90 } 92 }
91 93
92 } // namespace cc 94 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698