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

Side by Side Diff: content/common/cc_messages.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
« cc/gl_renderer.cc ('K') | « content/common/cc_messages.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/common/cc_messages.h" 5 #include "content/common/cc_messages.h"
6 6
7 #include "cc/compositor_frame.h" 7 #include "cc/compositor_frame.h"
8 #include "content/public/common/common_param_traits.h" 8 #include "content/public/common/common_param_traits.h"
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebData.h" 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebData.h"
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h" 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFilterOperations .h"
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 LogParam(p.resource_list, l); 650 LogParam(p.resource_list, l);
651 l->append(", ["); 651 l->append(", [");
652 for (size_t i = 0; i < p.render_pass_list.size(); ++i) { 652 for (size_t i = 0; i < p.render_pass_list.size(); ++i) {
653 if (i) 653 if (i)
654 l->append(", "); 654 l->append(", ");
655 LogParam(*p.render_pass_list[i], l); 655 LogParam(*p.render_pass_list[i], l);
656 } 656 }
657 l->append("])"); 657 l->append("])");
658 } 658 }
659 659
660 void ParamTraits<cc::DrawQuad::AntiAliasing>::Write(
jamesr 2013/01/08 23:01:58 yeah this really doesn't make sense to serialize s
reveman 2013/01/09 14:20:05 This is not the full AA decision. It tells the par
661 Message* m, const cc::DrawQuad::AntiAliasing& p) {
662 ParamTraits<float>::Write(m, p.left_edge);
663 ParamTraits<float>::Write(m, p.top_edge);
664 ParamTraits<float>::Write(m, p.right_edge);
665 ParamTraits<float>::Write(m, p.bottom_edge);
666 }
667
668 bool ParamTraits<cc::DrawQuad::AntiAliasing>::Read(
669 const Message* m,
670 PickleIterator* iter,
671 cc::DrawQuad::AntiAliasing* r) {
672 bool left_edge, top_edge, right_edge, bottom_edge;
673 if (!ParamTraits<bool>::Read(m, iter, &left_edge) ||
674 !ParamTraits<bool>::Read(m, iter, &top_edge) ||
675 !ParamTraits<bool>::Read(m, iter, &right_edge) ||
676 !ParamTraits<bool>::Read(m, iter, &bottom_edge))
677 return false;
678 r->left_edge = left_edge;
679 r->top_edge = top_edge;
680 r->right_edge = right_edge;
681 r->bottom_edge = bottom_edge;
682 return true;
683 }
684
685 void ParamTraits<cc::DrawQuad::AntiAliasing>::Log(
686 const cc::DrawQuad::AntiAliasing& p, std::string* l) {
687 l->append(base::StringPrintf("(%d, %d, %d, %d)",
688 p.left_edge,
689 p.top_edge,
690 p.right_edge,
691 p.bottom_edge));
692 }
693
660 } // namespace IPC 694 } // namespace IPC
OLDNEW
« cc/gl_renderer.cc ('K') | « content/common/cc_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698