Commit Graph

43 Commits

Author SHA1 Message Date
halcanary
96fcdcc219 Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
2015-08-27 07:41:16 -07:00
mtklein
36352bf5e3 C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}
NOPRESUBMIT=true

BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=1037793002

Review URL: https://codereview.chromium.org/1037793002
2015-03-25 18:17:32 -07:00
mtklein
72c9faab45 Fix up all the easy virtual ... SK_OVERRIDE cases.
This fixes every case where virtual and SK_OVERRIDE were on the same line,
which should be the bulk of cases.  We'll have to manually clean up the rest
over time unless I level up in regexes.

for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end

BUG=skia:

Review URL: https://codereview.chromium.org/806653007
2015-01-09 10:06:40 -08:00
tfarina
aa458fb20a Cleanup: More override fixes - another round.
BUG=skia:3075
TEST=ninja -C out/Debug
TBR=reed@google.com

Review URL: https://codereview.chromium.org/831113002
2015-01-05 17:18:51 -08:00
reed
9e96aa07db remove unused TextBufferDirection enum
BUG=skia:

Review URL: https://codereview.chromium.org/621403002
2014-10-03 12:44:37 -07:00
reed
285d375508 remove dead code from sample
TBR=

Author: reed@google.com

Review URL: https://codereview.chromium.org/393063002
2014-07-15 19:56:55 -07:00
commit-bot@chromium.org
e003aecb30 remove unused Kernel33MaskFilter
R=robertphillips@google.com
TBR=robertphilips@google.com

Author: reed@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@14691 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-05-12 13:35:55 +00:00
commit-bot@chromium.org
0f10f7bf1f Allow toString capability to be toggled independent of developer mode.
This change is motivated by the desire to see the text information in the debugger when not in developer mode. It is structured so user's can disable it if the capability is not wanted.

R=bsalomon@google.com

Author: robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13795 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-03-13 18:02:17 +00:00
commit-bot@chromium.org
a8c183125f use SkColorType instead of SkBitmap::Config in samplecode
BUG=skia:
R=reed@google.com

Author: reed@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13473 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-02-17 02:55:57 +00:00
commit-bot@chromium.org
8b0e8ac5f5 Refactor read and write buffers.
Eliminates SkFlattenable{Read,Write}Buffer, promoting SkOrdered{Read,Write}Buffer
a step each in the hierarchy.

What used to be this:

SkFlattenableWriteBuffer -> SkOrderedWriteBuffer
SkFlattenableReadBuffer  -> SkOrderedReadBuffer
SkFlattenableReadBuffer  -> SkValidatingReadBuffer

is now

SkWriteBuffer
SkReadBuffer -> SkValidatingReadBuffer

Benefits:
  - code is simpler, names are less wordy
  - the generic SkFlattenableFooBuffer code in SkPaint was incorrect; removed
  - write buffers are completely devirtualized, important for record speed

This refactoring was mostly mechanical.  You aren't going to find anything
interesting in files with less than 10 lines changed.

BUG=skia:
R=reed@google.com, scroggo@google.com, djsollen@google.com, mtklein@google.com

Author: mtklein@chromium.org

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13245 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-30 18:58:24 +00:00
reed@google.com
bf0001d047 remove remaining references to Sk64 (obsolete)
BUG=

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

git-svn-id: http://skia.googlecode.com/svn/trunk@13042 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-01-13 14:53:55 +00:00
reed@google.com
e1ca705cac deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients
BUG=
R=robertphillips@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@12719 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-12-17 19:22:07 +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
e0e7cfe44b Change old PRG to be SkLCGRandom; change new one to SkRandom
The goal here is to get people to start using the new random number
generator, while leaving the old one in place so we don't have to 
rebaseline GMs.

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

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11169 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-09 20:09:12 +00:00
commit-bot@chromium.org
6485b0be74 Switch out random number generator for tests, benches, samples.
This change makes tests, benches and samples use the new SkMWCRandom PRNG. GMs will be saved for another time, as they'll require rebaselining.

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

Author: jvanverth@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11136 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-06 19:05:11 +00:00
skia.committer@gmail.com
8eaddb0089 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@8211 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-19 07:15:10 +00:00
robertphillips@google.com
0bd80fa01b Added toString to SkMaskFilter-derived classes
https://codereview.appspot.com/7889043/



git-svn-id: http://skia.googlecode.com/svn/trunk@8194 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-03-18 17:53:38 +00:00
skia.committer@gmail.com
e16efc1882 Sanitizing source files in Skia_Periodic_House_Keeping
git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-26 07:06:02 +00:00
robertphillips@google.com
b83b6b4f76 Added toString to SkXfermode-derived classes (for debugger)
https://codereview.appspot.com/7139058/



git-svn-id: http://skia.googlecode.com/svn/trunk@7308 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-22 14:32:09 +00:00
reed@google.com
4d5c26de0a pass modifier keys to click events (e.g. control | shift etc.)
Review URL: https://codereview.appspot.com/7062054

git-svn-id: http://skia.googlecode.com/svn/trunk@7082 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-01-08 16:17:50 +00:00
mike@reedtribe.org
3af2b8def6 fix warnings:
- initializer order in PictureRenderer.h
- const in xfermode overrides



git-svn-id: http://skia.googlecode.com/svn/trunk@6946 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-24 18:26:43 +00:00
reed@google.com
30711b764b change SkMaskFilter methods to const, in preparation for making the class as
immutable and re-entrant safe.
Review URL: https://codereview.appspot.com/6944069

git-svn-id: http://skia.googlecode.com/svn/trunk@6881 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-12-18 19:18:39 +00:00
rmistry@google.com
ae933ce0ea Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part III of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6475053

git-svn-id: http://skia.googlecode.com/svn/trunk@5264 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-23 18:19:56 +00:00
djsollen@google.com
c73dd5c688 Update SkFlattenable buffers to be more modular.
This CL is an effort to stage the conversion to named
parameters for all SkFlattenable commands. This particular
stage only does the following two things...

1. Move flattenable buffers from SkFlattenable.h into
   their own header.
2. Update and Add new read write methods for better clarity
   and convenience.

BUG=

Review URL: https://codereview.appspot.com/6448095

git-svn-id: http://skia.googlecode.com/svn/trunk@4980 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-08-07 15:54:32 +00:00
tomhudson@google.com
ffe39bd3b6 Fix type errors and a few warnings for Visual Studio 2010 64-bit build.
We're still far from 64b statically safe, mostly around SkReader32.h
and the address-alignment code in GrTypes.h.
Original code provided by jianliang79.

http://code.google.com/p/skia/issues/detail?id=601



git-svn-id: http://skia.googlecode.com/svn/trunk@3994 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-05-17 15:38:00 +00:00
djsollen@google.com
257fc5bd13 Remove unused static functions from SampleApp and effects
Review URL: https://codereview.appspot.com/5956050

git-svn-id: http://skia.googlecode.com/svn/trunk@3543 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-29 17:54:05 +00:00
djsollen@google.com
54924243c1 Cleanup code related to SkFlattenable::flatten()
The following changes were made by this CL:

1. Make flatten() a protected method as callers should use
   SkFlattenableWriteBuffer to flatten an object
2. Make flatten a const method (including subclasses)
3. Mark subclass implementation of flatten with SK_OVERRIDE
4. Ensure overridden flatten impls call their parent
5. Remove no-op implementations of flatten from subclasses

Additionally, if necessary the unflattening constructor was
also moved to the protected section of the subclasses
header if it was not already there.

git-svn-id: http://skia.googlecode.com/svn/trunk@3540 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-29 15:18:04 +00:00
djsollen@google.com
ba28d03e94 Create macro for registering classes for deserialization
Review URL: https://codereview.appspot.com/5909063

git-svn-id: http://skia.googlecode.com/svn/trunk@3494 2bbb7eff-a529-9590-31e7-b0007b416f81
2012-03-26 17:57:35 +00:00
epoger@google.com
ec3ed6a5eb Automatic update of all copyright notices to reflect new license terms.
I have manually examined all of these diffs and restored a few files that
seem to require manual adjustment.

The following files still need to be modified manually, in a separate CL:

android_sample/SampleApp/AndroidManifest.xml
android_sample/SampleApp/res/layout/layout.xml
android_sample/SampleApp/res/menu/sample.xml
android_sample/SampleApp/res/values/strings.xml
android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java
android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java
experimental/CiCarbonSampleMain.c
experimental/CocoaDebugger/main.m
experimental/FileReaderApp/main.m
experimental/SimpleCocoaApp/main.m
experimental/iOSSampleApp/Shared/SkAlertPrompt.h
experimental/iOSSampleApp/Shared/SkAlertPrompt.m
experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig
experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig
gpu/src/android/GrGLDefaultInterface_android.cpp
gyp/common.gypi
gyp_skia
include/ports/SkHarfBuzzFont.h
include/views/SkOSWindow_wxwidgets.h
make.bat
make.py
src/opts/memset.arm.S
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
src/ports/SkXMLParser_empty.cpp
src/utils/ios/SkImageDecoder_iOS.mm
src/utils/ios/SkOSFile_iOS.mm
src/utils/ios/SkStream_NSData.mm
tests/FillPathTest.cpp
Review URL: http://codereview.appspot.com/4816058

git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-07-28 14:26:00 +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
reed@google.com
9e39bb3603 code style, inherit from SampleView
git-svn-id: http://skia.googlecode.com/svn/trunk@1361 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-18 12:17:53 +00:00
reed@google.com
2f3dc9dc4c add typefacecache
speedup lcd blits
clean up some samples



git-svn-id: http://skia.googlecode.com/svn/trunk@1220 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-05-02 17:33:45 +00:00
reed@google.com
261b8e2ca1 fix warnings
git-svn-id: http://skia.googlecode.com/svn/trunk@1129 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-04-14 17:53:24 +00:00
reed@google.com
82065d667f remove SkRefCnt safeRef() and safeUnref(), and replace the call-sites with
SkSafeRef() and SkSafeUnref().

This is basically a bug waiting to happen. An optimizing compiler can remove
checks for null on "this" if it chooses. However, SkRefCnt::safeRef() relies on
precisely this check...

void SkRefCnt::safeRef() {
    if (this) {
        this->ref();
    }
}

Since a compiler might skip the if-clause, it breaks the intention of this
method, hence its removal.

static inline void SkSafeRef(SkRefCnt* obj) {
    if (obj) {
        obj->ref();
    }
}

This form is not ignored by an optimizing compile, so we use it instead.




git-svn-id: http://skia.googlecode.com/svn/trunk@762 2bbb7eff-a529-9590-31e7-b0007b416f81
2011-02-07 15:30:46 +00:00
reed@android.com
f2b98d67dc merge with changes for GPU backend
git-svn-id: http://skia.googlecode.com/svn/trunk@637 2bbb7eff-a529-9590-31e7-b0007b416f81
2010-12-20 18:26:13 +00:00
reed@android.com
cb34235f46 fix matrix use in coretext fonthost
update gm images to new baseline



git-svn-id: http://skia.googlecode.com/svn/trunk@590 2bbb7eff-a529-9590-31e7-b0007b416f81
2010-07-22 18:27:53 +00:00
reed@android.com
04d86c6a6b update to try out programmable shaders
git-svn-id: http://skia.googlecode.com/svn/trunk@478 2bbb7eff-a529-9590-31e7-b0007b416f81
2010-01-25 22:02:44 +00:00
reed@android.com
6b82d1adc6 add isConvex() hit to SkPath, to be used to speed up fills and opengl
set linewidth in gldevice for hair rects
remove some cruft from samples
add more gl-unimpl messages



git-svn-id: http://skia.googlecode.com/svn/trunk@199 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-06-03 02:35:01 +00:00
reed@android.com
44a6312cf6 call notifyPixelsChanged() when the pages are flipped in pageflippixelref
update samples



git-svn-id: http://skia.googlecode.com/svn/trunk@192 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-30 02:40:28 +00:00
reed@android.com
671cd65678 add SDL support
git-svn-id: http://skia.googlecode.com/svn/trunk@182 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-05-22 20:44:12 +00:00
reed@android.com
069b827f8e API cleanup: rename typeface Create to CreateFromName, and remove default arg
git-svn-id: http://skia.googlecode.com/svn/trunk@108 2bbb7eff-a529-9590-31e7-b0007b416f81
2009-03-04 15:31:48 +00:00
reed@android.com
da342a8917 update more sample code to new compose shader header
git-svn-id: http://skia.googlecode.com/svn/trunk@48 2bbb7eff-a529-9590-31e7-b0007b416f81
2008-12-23 18:37:08 +00:00
reed@android.com
8a1c16ff38 grab from latest android
git-svn-id: http://skia.googlecode.com/svn/trunk@27 2bbb7eff-a529-9590-31e7-b0007b416f81
2008-12-17 15:59:43 +00:00