Skip to content

Commit

Permalink
Define SK_PICTURE_CLONE_NOOP.
Browse files Browse the repository at this point in the history
This makes SkPicture::clone() a cheap ref, meaning impl-side painting will render
tiles concurrently from the same source SkPicture rather than from clones.

After testing for a few months in Skia, we believe SkPicture is thread safe enough
to try this out on the Chrome bots.  Please revert this at the slightest sign of
crash, flaky drawing, etc.

CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:linux_layout_rel

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@288096 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
mtklein@chromium.org committed Aug 7, 2014
1 parent c8d99c5 commit 84c2316
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions skia/config/SkUserConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#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

0 comments on commit 84c2316

Please sign in to comment.