Commit Graph

42 Commits

Author SHA1 Message Date
danakj
f58a562d56 Disable discardable memory for the resource cache until tests pass.
BUG=skia:2926
R=reed@google.com

Author: danakj@chromium.org

Review URL: https://codereview.chromium.org/568493002
2014-09-11 11:08:50 -07:00
danakj
790ffe3feb Make SkBitmapCache remove invalid bitmaps from the SkResourceCache.
This adds SkResourceCache::Remove() which will remove a resource from
its cache. The resource is required to be unlocked at the time Remove()
is called.

Then SkBitmapCache::Find() makes use of this to Remove() bitmaps from
the cache whose pixels have been evicted. This allows the bitmap to be
re-added to the cache with pixels again.

After this change, background a tab (and discarding all the bitmaps'
contents) no longer disables image caching for those discarded images
once the tab is visible again.

BUG=skia:2926
NOTRY=true
R=reed@android.com, tomhudson@google.com, reed@google.com

Author: danakj@chromium.org

Review URL: https://codereview.chromium.org/561953002
2014-09-11 10:49:52 -07:00
mtklein
753b870c62 Define NDEBUG instead of SK_DEBUG/SK_RELEASE.
This makes our builds more like Chrome's, and will make our builds fail
if we accidentally use if SK_DEBUG instead of ifdef SK_DEBUG.

BUG=skia:
R=mtklein@google.com

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/481513004
2014-08-20 07:38:46 -07:00
reed
58f1e925fd remove unneeded flags for android
R=scroggo@google.com

Author: reed@google.com

Review URL: https://codereview.chromium.org/369683004
2014-07-07 13:48:59 -07:00
commit-bot@chromium.org
d70fa2013a Deprecate SaveFlags use in the public SkCanvas API.
Because we still have internal users for now (to support the deprecated
mode), this CL introduces an external-only variant of deprecation.

Chromium is no longer using the deprecated methods, but Android may need
to suppress SK_ATTR_EXTERNALLY_DEPRECATED warnings.

R=reed@google.com, robertphillips@google.com, scroggo@google.com, bungeman@google.com, mtklein@google.com

Author: fmalita@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14367 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-24 21:51:58 +00:00
scroggo@google.com
d4adfa37fb Reland "Gyp file changes for the android framework."
Relands https://codereview.chromium.org/153093003/, which was reverted
with https://skia.googlesource.com/skia.git/+/eb6295044b97db05ec40625dcebc2459b2a38a98

This reverts commit 6b32be1402eb6c549d5ba1db71860e24f9de2991.

BUG=skia:1975
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13321 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-05 16:35:12 +00:00
scroggo@google.com
eb6295044b Gyp file changes for the android framework.
Split off from https://codereview.chromium.org/140503007/.

The eventual goal is to create our Android.mk from gyp. This patch
adds an option for skia_android_framework with the right settings.
The follow-up (https://codereview.chromium.org/140503007/) will
use scripts to create the final makefile.

gyp/android_deps.gyp:
Use different dependencies for the framework than for building Skia
normally.

gyp/android_framework_lib.gyp:
Like skia_lib, specifies the minimum needed for building Skia, in this
case for the framework.

gyp/common_conditions.gypi:
Add settings specific to skia_android_framework. In some cases this
means turning off flags and defines.

gyp/common.gypi
Turn off SK_DEBUG and SK_DEVELOPER when building for the framework.
This allows the framework to create a single makefile which can be
modified to add SK_DEBUG and SK_DEVELOPER as desired.

gyp/common_variables.gypi:
Add skia_android_framework.

gyp/core.gyp:
Don't depend on cpufeatures, and add the cutils library for
skia_android_framework.

gyp/freetype.gyp:
skia_android_framework-specific options:
Don't include freetype_static as a dependency.
Include the proper folders.
Include the android library.

gyp/images.gyp:
Don't export libjpeg as a dependency for targets that include images
for the framework.
Also reorder image decoders to match the Android order, leaving our
most commonly used ones last (and therefore first in the chain for
trying them).

gyp/libwebp.gyp:
Use the system webp when building for the Android framework. Specify
the correct settings for the framework.

gyp/opts.gyp:
Specify a default set of files to compile when there are no possible
optimizations.

gyp/pdf.gyp:
Add dependencies for Android framework.

gyp/zlib.gyp:
Include the zlib folder, and undefine SK_ZLIB_INCLUDE.

BUG=skia:1975
R=djsollen@google.com

Committed: https://code.google.com/p/skia/source/detail?r=13298

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13304 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-04 16:08:48 +00:00
scroggo@google.com
1c9bd55ea3 Gyp file changes for the android framework.
Split off from https://codereview.chromium.org/140503007/.

The eventual goal is to create our Android.mk from gyp. This patch
adds an option for skia_android_framework with the right settings.
The follow-up (https://codereview.chromium.org/140503007/) will
use scripts to create the final makefile.

gyp/android_deps.gyp:
Use different dependencies for the framework than for building Skia
normally.

gyp/android_framework_lib.gyp:
Like skia_lib, specifies the minimum needed for building Skia, in this
case for the framework.

gyp/common_conditions.gypi:
Add settings specific to skia_android_framework. In some cases this
means turning off flags and defines.

gyp/common.gypi
Turn off SK_DEBUG and SK_DEVELOPER when building for the framework.
This allows the framework to create a single makefile which can be
modified to add SK_DEBUG and SK_DEVELOPER as desired.

gyp/common_variables.gypi:
Add skia_android_framework.

gyp/core.gyp:
Don't depend on cpufeatures, and add the cutils library for
skia_android_framework.

gyp/freetype.gyp:
skia_android_framework-specific options:
Don't include freetype_static as a dependency.
Include the proper folders.
Include the android library.

gyp/images.gyp:
Don't export libjpeg as a dependency for targets that include images
for the framework.
Also reorder image decoders to match the Android order, leaving our
most commonly used ones last (and therefore first in the chain for
trying them).

gyp/libwebp.gyp:
Use the system webp when building for the Android framework. Specify
the correct settings for the framework.

gyp/opts.gyp:
Specify a default set of files to compile when there are no possible
optimizations.

gyp/pdf.gyp:
Add dependencies for Android framework.

gyp/zlib.gyp:
Include the zlib folder, and undefine SK_ZLIB_INCLUDE.

BUG=skia:1975
R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13298 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-04 14:50:20 +00:00
commit-bot@chromium.org
611fde182a Remove the comments settings for vim tab width and expansion variables.
These add unnecessary bloat for everyone to carry around, so we just
remove them now.

The same change was made in chromium by Tony in
http://codereview.chromium.org/7310019 - crrev.com/92046

BUG=None
TEST=./gyp_skia
R=mtklein@google.com

Author: tfarina@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12443 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-02 22:23:03 +00:00
commit-bot@chromium.org
4b413c8bb1 remove SkFloatToScalar macro
BUG=
R=reed@google.com, djsollen@google.com

Author: caryclark@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12385 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-11-25 19:44:07 +00:00
commit-bot@chromium.org
5651512aa3 Remove uses of GR_RELEASE.
Instead of using GR_RELEASE new code should just use SK_RELEASE, like its
counterpart SK_DEBUG instead of GR_DEBUG.

R=bsalomon@google.com, robertphillips@google.com

Author: tfarina@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23479017

git-svn-id: http://skia.googlecode.com/svn/trunk@11070 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-03 23:32:08 +00:00
commit-bot@chromium.org
515dcd3603 Replace uses of GR_DEBUG by SK_DEBUG.
BUG=None
R=bsalomon@google.com, robertphillips@google.com

Author: tfarina@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23137022

git-svn-id: http://skia.googlecode.com/svn/trunk@10978 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-08-28 14:17:03 +00:00
borenet@google.com
5bbf1d5260 Use a single cros_toolchain tarball for ChromeOS build
It's stored in our GS bucket, so we won't need two sets of credentials.
(SkipBuildbotRuns) since this isn't in use.

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9743 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-24 19:31:58 +00:00
zachr@google.com
28c27c8b79 enable shared lib support in linux for lua
R=bungeman@google.com, reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9703 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-20 17:15:05 +00:00
borenet@google.com
05d550ed36 GYP Changes and Scripts for Compiling Skia for ChromeOS
For now, this requires having a complete ChromeOS checkout.

R=djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9505 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-11 15:52:19 +00:00
djsollen@google.com
52f0297aaf Prepare skia for shared library build on android
This reapplies revision 9378 after the buildbot has been updated.

R=borenet@google.com, djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9395 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-03 12:10:19 +00:00
djsollen@google.com
a96627fd24 prepare skia for shared library build on android
R=borenet@google.com, djsollen@google.com

Committed: https://code.google.com/p/skia/source/detail?r=9378

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9379 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 20:09:47 +00:00
djsollen@google.com
cf5348f5aa prepare skia for shared library build on android
R=borenet@google.com, djsollen@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9378 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-31 20:02:56 +00:00
edisonn@google.com
184487c808 Collect minidump and print callstack if an app chrashes.
Review URL: https://codereview.chromium.org/12387018

git-svn-id: http://skia.googlecode.com/svn/trunk@8044 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-08 18:00:16 +00:00
humper@google.com
7af56bee17 Runtime configuration system for skia. This will allow developers to control settings at launch time without relying on compile-time flags or recompilation. It can be used to turn features on and off, as well as to control numeric quantities to 'tune' algorithms. Once I make sure it's working across all platforms I'll send out a quick tutorial on its use.
Review URL: https://codereview.appspot.com/7098051

git-svn-id: http://skia.googlecode.com/svn/trunk@7158 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-14 18:49:19 +00:00
borenet@google.com
7158e6acca Improve NaCl support
- Add nacl_make script to build Skia targets for NaCl using gyp
- Add nacl_interface for command-line apps
- Add nacl_sample as front-end for SampleApp
- Add freetype to DEPS
- Various gyp tweaks for NaCl

TODO:
- Implement GL interface
- Implement font host
- Fix plumbing so that SampleApp works properly
Review URL: https://codereview.appspot.com/6671044

git-svn-id: http://skia.googlecode.com/svn/trunk@6245 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-11-01 17:43:44 +00:00
caryclark@google.com
594dd3cd78 iOS support work in progress
include/core/SkTypes.h
- address unsigned warning

include/core/SkInstCnt.h
src/core/SkInstCnt.cpp
gyp/common.gypi
- always define SK_ENABLE_INST_COUNT for debug builds

src/views/mac/SkNSView.mm
- only call glClear if there is a GL context

src/ports/SkImageDecoder_CG.cpp
- fix iOS hack by using proper include

gyp/opts.gyp
- exclude more ARM files from iOS for now (see issue 900)

gyp/common_conditions.gypi
- add release, more ios specific common settings

gyp/bench.gyp
- add iOS condition

gyp/SampleApp.gyp
- remove precompiled header, hardcoded SDK path
- add more frameworks

gyp/debugger.gyp
- fix syntax error
- add iOS/Android condition

gyp/core.gyp
- remove hardcoded SDK path, add more frameworks

gyp/common_variables.gypi
- add ios SDK path
- add ios SDK version

gyp/iOSSampleApp.gyp
- remove obsolete project

gyp/zlib.gyp
- add ios library path
Review URL: https://codereview.appspot.com/6551070

git-svn-id: http://skia.googlecode.com/svn/trunk@5649 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-09-24 19:33:57 +00:00
bungeman@google.com
b49d989997 Remove SK_FONTHOST_WIN_DW define.
git-svn-id: http://skia.googlecode.com/svn/trunk@5132 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-16 17:35:58 +00:00
bungeman@google.com
e8f0592ae8 DirectWrite font host for skia.
https://codereview.appspot.com/5417063/


git-svn-id: http://skia.googlecode.com/svn/trunk@5128 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-16 16:13:40 +00:00
bungeman@google.com
97efada074 Gamma correcting masks.
https://codereview.appspot.com/6244068/


git-svn-id: http://skia.googlecode.com/svn/trunk@4841 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-07-30 20:40:50 +00:00
djsollen@google.com
7f562ad0ad fix the build
git-svn-id: http://skia.googlecode.com/svn/trunk@4387 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 16:19:03 +00:00
djsollen@google.com
e341cb37e6 Separate target architecture type and width into separate variables.
Also add support for building mac in 64 bit mode.
Review URL: https://codereview.appspot.com/6343050

git-svn-id: http://skia.googlecode.com/svn/trunk@4385 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-28 16:08:05 +00:00
robertphillips@google.com
b74af872cc Separated Inst counting from the SK_DEBUG #define (now SK_ENABLE_INST_COUNT)
http://codereview.appspot.com/6353047/



git-svn-id: http://skia.googlecode.com/svn/trunk@4376 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-06-27 19:41:42 +00:00
robertphillips@google.com
021bce94a3 Delivering .gyp files to enable building & linking w/ ANGLE on Windows
http://codereview.appspot.com/5933057/



git-svn-id: http://skia.googlecode.com/svn/trunk@3580 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-04-02 20:42:26 +00:00
epoger@google.com
573e8ba41c Add os_posix gyp variable, nesting variables dicts as needed to do so.
Review URL: https://codereview.appspot.com/5845050

git-svn-id: http://skia.googlecode.com/svn/trunk@3418 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-16 18:28:24 +00:00
epoger@google.com
aa3b6a965e Make all gyp targets automatically include common.gypi
Do this, rather than including common.gypi explicitly in all our gyp files, so that gyp files we use but do not maintain (e.g., third_party/externals/libjpeg/libjpeg.gyp) will include common.gypi too.
Review URL: https://codereview.appspot.com/5820068

git-svn-id: http://skia.googlecode.com/svn/trunk@3411 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-16 13:52:49 +00:00
bsalomon@google.com
373a6635b7 Virtualize SkGLContext with subclasses SkNativeGLContext and SkMesaGLContext, allow both in gm
Review URL: http://codereview.appspot.com/5307045/



git-svn-id: http://skia.googlecode.com/svn/trunk@2499 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-10-19 20:43:20 +00:00
seanpaul@google.com
1134f98165 Refactor the bench and common gyp/gypi files to allow for building bench within
a chromium checkout (using chromium build configuration).

BUG=362
TEST=Build bench from within the chromium and skia source tree, ensured it built
     and ran successfully.
Review URL: http://codereview.appspot.com/5023042

git-svn-id: http://skia.googlecode.com/svn/trunk@2270 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-09-15 14:24:33 +00:00
bsalomon@google.com
8966d0149b remove nonexistent files from gyps and make AdditionalOptions a list rather than str
ReviewURL: http://codereview.appspot.com/5022042/



git-svn-id: http://skia.googlecode.com/svn/trunk@2262 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-09-13 20:57:33 +00:00
epoger@google.com
3448e9e134 disable optimization in Mac debug build
git-svn-id: http://skia.googlecode.com/svn/trunk@1994 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-29 13:46:56 +00:00
epoger@google.com
fd03db0fe9 Manually update copyright notices in files that defied the automated process
used in http://codereview.appspot.com/4816058/ ('Automatic update of all copyright notices to reflect new license terms.')

Note that the following files have been left alone, because they name
copyright holders outside of Google.  Please let me know if we need to update
these files:

experimental/CiCarbonSampleMain.c
src/opts/memset16_neon.S
src/opts/memset32_neon.S
src/opts/opts_check_arm.cpp
src/ports/SkDebug_brew.cpp
src/ports/SkMemory_brew.cpp
src/ports/SkOSFile_brew.cpp
Review URL: http://codereview.appspot.com/4806054

git-svn-id: http://skia.googlecode.com/svn/trunk@1981 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-28 14:24:55 +00:00
epoger@google.com
58007d713e Add debug symbols to Windows static libraries
As requested in http://code.google.com/p/skia/issues/detail?id=320
Review URL: http://codereview.appspot.com/4805050

git-svn-id: http://skia.googlecode.com/svn/trunk@1940 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-22 14:41:26 +00:00
epoger@google.com
ea5dfa87b2 merge of SkiOSSampleApp into SampleApp, still a work in progress
http://codereview.appspot.com/4636078/



git-svn-id: http://skia.googlecode.com/svn/trunk@1785 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-01 21:01:32 +00:00
epoger@google.com
8846cb22ce Create new 'skia_os' variable to replace use of 'OS' in most places.
http://codereview.appspot.com/4627085



git-svn-id: http://skia.googlecode.com/svn/trunk@1782 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-01 20:20:07 +00:00
epoger@google.com
5351b373b3 combine target_defaults.gypi into common.gypi
http://codereview.appspot.com/4654080



git-svn-id: http://skia.googlecode.com/svn/trunk@1780 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-01 17:16:26 +00:00
senorblanco@chromium.org
64cc579efa The plain Makefile was using -Wall, but the gyp build wasn't. This CL turns on
-Wall -Wextra and -Wno-unused in common.gypi.  This revealed a lot of warnings
(and some actual bugs), all of which I fixed here.  This is pretty mindless
stuff for the most part (order of intialization, missing initializers, && within
||, etc), but will allow us to build cleanly with -Wall and -Wextra (and
-Werror, if we so choose).

I put defaults into switches that were missing cases.  I could put in the actual
missing enums instead if that's desired.  I could also assert on missing enums
instead of break, if that's desired.  I wasn't sure how to test the stuff in
"animator", so that should be looked at a bit more closely.

Review URL:  http://codereview.appspot.com/4547055/



git-svn-id: http://skia.googlecode.com/svn/trunk@1386 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-19 19:58:58 +00:00
senorblanco@chromium.org
afac88855a This patch provides the include file common.gypi (cargo culted from another
project) which implements basic support for Debug and Release targets in the
gyp-generated project files.  All configurations build on all platforms with
the exception of Windows/Release, which seems to have compile errors not
resolved here.

Review URL:  http://codereview.appspot.com/4391042/



git-svn-id: http://skia.googlecode.com/svn/trunk@1101 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-11 15:59:47 +00:00