Skip to content

Commit

Permalink
Try backing SkPicture with SkRecord in Chromium.
Browse files Browse the repository at this point in the history
This is our first attempt, mostly to feel this out.  Performance and
correctness problems are both possible.  Please revert this if a benchmark even
smells funny.

That said, we've been working on this a while, are pretty confident it's good
stuff, and have had Skia's internal testing entirely switched over for a week.
Parts of Chromium that serialize and deserialize SkPictures are already
switched over.  This CL finishes things off by switching the default
recorded-from-scratch SkPicture to use SkRecord too.

BUG=

Committed: https://chromium.googlesource.com/chromium/src/+/f7450daaf38f4951b23fabaaaf659c6af33a705c

Review URL: https://codereview.chromium.org/504823003

Cr-Commit-Position: refs/heads/master@{#292550}
  • Loading branch information
mtklein authored and Commit bot committed Aug 29, 2014
1 parent e7c36a1 commit ae18565
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions skia/config/SkUserConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
#ifndef SkUserConfig_DEFINED
#define SkUserConfig_DEFINED

// Turns SkPicture::clone() into a simple "return SkRef(this);" as a way to
// test the threadsafety of SkPicture playback.
#define SK_PICTURE_CLONE_NOOP 1

/* SkTypes.h, the root of the public header files, does the following trick:
#include <SkPreConfig.h>
Expand Down Expand Up @@ -261,6 +257,13 @@ SK_API void SkDebugf_FileLine(const char* file, int line, bool fatal,
#define SK_SUPPORT_LEGACY_GETDEVICE
#endif

// Turns SkPicture::clone() into a simple "return SkRef(this);" as a way to
// test the threadsafety of SkPicture playback.
#define SK_PICTURE_CLONE_NOOP 1

// Turns on new (nicer, hopefully faster) SkPicture backend.
#define SK_PICTURE_USE_SK_RECORD 1

// ===== End Chrome-specific definitions =====

#endif

0 comments on commit ae18565

Please sign in to comment.