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

Unified Diff: cc/quads/largest_draw_quad.cc

Issue 2324723002: Speed up quad deserialization. (Closed)
Patch Set: comment added Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/quads/largest_draw_quad.h ('k') | cc/quads/render_pass.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/quads/largest_draw_quad.cc
diff --git a/cc/quads/largest_draw_quad.cc b/cc/quads/largest_draw_quad.cc
index 35c64314c6d87965e331a478f83e3537f3af7487..76369e4f7913a57cedf39df8680ed07253928126 100644
--- a/cc/quads/largest_draw_quad.cc
+++ b/cc/quads/largest_draw_quad.cc
@@ -19,13 +19,12 @@
#include "cc/quads/yuv_video_draw_quad.h"
namespace {
-const size_t kLargestDrawQuadSize =
- sizeof(cc::YUVVideoDrawQuad) + sizeof(gfx::ColorSpace);
+const size_t kLargestDrawQuadSize = sizeof(cc::YUVVideoDrawQuad);
} // namespace
namespace cc {
-size_t LargestDrawQuadSize() {
+size_t LargestDrawQuadSubclassSize() {
// Currently the largest quad is either a RenderPassDrawQuad or a
// StreamVideoDrawQuad depends on hardware structure.
@@ -56,4 +55,9 @@ size_t LargestDrawQuadSize() {
return kLargestDrawQuadSize;
}
+size_t LargestDrawQuadSerializedSize() {
+ return std::max<size_t>(kLargestDrawQuadSize,
+ sizeof(YUVVideoDrawQuad) + sizeof(gfx::ColorSpace));
+}
+
} // namespace cc
« no previous file with comments | « cc/quads/largest_draw_quad.h ('k') | cc/quads/render_pass.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698