Commit Graph

4788 Commits

Author SHA1 Message Date
wangyix
7ef45a1aeb Added mangleString member and onBefore*, onAfter* functions to GrGLFragmentShaderBuilder
BUILDS! Added mangleString, onBefore, and onAfterChildProcEmitCode() to GrGLFragmentShaderBuilder.cpp

BUG=skia:4182

Review URL: https://codereview.chromium.org/1288723002
2015-08-13 06:51:35 -07:00
robertphillips
6e83ac778f Defer flushes if kPreferNoIO is specified
Prior to this patch clients who were solely uploading to textures (e.g., SW Mask Mgr) would cause extra flushes b.c., even though kPreferNoIO was being specified, resources with pending IO would still be returned even though there was plenty of space in the resource cache.

Review URL: https://codereview.chromium.org/1286203002
2015-08-13 05:19:14 -07:00
reed
cc1229c9d5 Revert "Revert[4] "move some public headers into private""
This reverts commit 33e00db73d.

BUG=skia:
TBR=
NOTREECHECKS=True

FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/components/user_manager/user_manager_test_support.fake_user_manager.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=242792-1 -DCOMPONENT_BUILD -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DIMAGE_LOADER_EXTENSION=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DENABLE_TOPCHROME_MD=1 -DUSE_UDEV -DDONT_EMBED_BUILD_METADATA -DDCHECK_ALWAYS_ON=1 -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DENABLE_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DUNIT_TEST -DGTEST_HAS_RTTI=0 -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DOS_CHROMEOS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -D_GLIBCXX_DEBUG=1 -Igen -I../.. -I../../skia/config -I../../testing/gmock/include -I../../testing/gtest/include -Werror -pthread -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-reserved-user-defined-literal -Xclang -load -Xclang /b/build/slave/linux_chromeos/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -fcolor-diagnostics -B/b/build/slave/linux_chromeos/build/src/third_party/binutils/Linux_x64/Release/bin -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -m64 -march=x86-64 -O0 -g -funwind-tables -gsplit-dwarf -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -g0 -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -std=gnu++11  -c ../../components/user_manager/fake_user_manager.cc -o obj/components/user_manager/user_manager_test_support.fake_user_manager.o
In file included from ../../components/user_manager/fake_user_manager.cc:5:
In file included from ../../components/user_manager/fake_user_manager.h:12:
In file included from ../../components/user_manager/user.h:14:
In file included from ../../components/user_manager/user_image/user_image.h:12:
In file included from ../../ui/gfx/image/image_skia.h:15:
In file included from ../../ui/gfx/image/image_skia_rep.h:8:
In file included from ../../third_party/skia/include/core/SkBitmap.h:11:
In file included from ../../third_party/skia/include/core/SkColor.h:11:
In file included from ../../third_party/skia/include/core/SkScalar.h:12:
../../third_party/skia/include/core/../private/SkFloatingPoint.h:13:10: fatal error: 'SkTypes.h' file not found
#include "SkTypes.h"

ninja -w dupbuild=err -C /b/build/slave/linux_chromeos/build/src/out/Debug accessibility_unittests accessibility_unittests_run app_list_unittests app_list_unittests_run app_shell_unittests app_shell_unittests_run ash_unittests ash_unittests_run aura_builder aura_unittests aura_unittests_run base_unittests base_unittests_run browser_tests browser_tests_run cacheinvalidation_unittests cacheinvalidation_unittests_run chromeos_unittests chromeos_unittests_run components_unittests components_unittests_run compositor_unittests compositor_unittests_run content_browsertests content_browsertests_run content_unittests content_unittests_run crypto_unittests crypto_unittests_run dbus_unittests device_unittests device_unittests_run display_unittests display_unittests_run events_unittests events_unittests_run extensions_browsertests extensions_browsertests_run extensions_unittests extensions_unittests_run gcm_unit_tests gcm_unit_tests_run gfx_unittests gfx_unittests_run google_apis_unittests google_apis_unittests_run gpu_unittests gpu_unittests_run interactive_ui_tests interactive_ui_tests_run ipc_tests ipc_tests_run jingle_unittests jingle_unittests_run media_unittests media_unittests_run message_center_unittests message_center_unittests_run midi_unittests midi_unittests_run nacl_helper_nonsfi_unittests nacl_loader_unittests nacl_loader_unittests_run net_unittests net_unittests_run ppapi_unittests printing_unittests printing_unittests_run remoting_unittests remoting_unittests_run sandbox_linux_unittests sandbox_linux_unittests_run skia_unittests skia_unittests_run sql_unittests sql_unittests_run sync_unit_tests sync_unit_tests_run ui_base_unittests ui_base_unittests_run ui_chromeos_unittests ui_touch_selection_unittests ui_touch_selection_unittests_run unit_tests unit_tests_run url_unittests url_unittests_run views_unittests wm_unittests wm_unittests_run -j50
ninja: Entering directory `/b/build/slave/linux_chromeos/build/src/out/Debug'

Review URL: https://codereview.chromium.org/1288863002
2015-08-12 18:58:52 -07:00
bungeman
72440a3785 Use forwarding with SkTLazy::init.
This allows removal the difficult to use (and so currently unused)
placement new and related macros to allow any constructor of T to
be used to initilize the storage of SkTLazy. This also properly
aligns the SkTLazy storage.

Review URL: https://codereview.chromium.org/1283183003
2015-08-12 13:37:17 -07:00
joshualitt
9bc3954fc1 Refactor helper function for SkBitmapShader to GrFragmentProcessor
BUG=skia:

Review URL: https://codereview.chromium.org/1285283002
2015-08-12 12:57:54 -07:00
reed
33e00db73d Revert[4] "move some public headers into private"
This reverts commit 9cdcabefa3.

BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1291613007
2015-08-12 12:53:10 -07:00
jvanverth
a50e17a391 Add support for a new GPU interface
Review URL: https://codereview.chromium.org/1290813002
2015-08-12 12:19:36 -07:00
bsalomon
cb02b38b2c Check for xfer barriers in GrBatch, auto-issue barriers in GrGpu
Review URL: https://codereview.chromium.org/1287973003
2015-08-12 11:14:50 -07:00
wangyix
58d890bd45 All child GrFragmentProcs' transforms and textures will be stored in the root GrFragmentProc in preorder
Changed childProcessor(i) to return const referencd

Fixed rootProc/parentProc offset issues; renamed a few things.

added nonempty check to gatherTransforms to avoid segfault

removed recursive append_gr_coord_transforms() from GrGLProgramBuilder

BUILDS! Changed num*includeProc() calls to num() calls

added gatherCoordTransforms(). added coordTransforms() for root proc only

Modified GrFragmentProcessor to append child proc transforms and textures to root proc's arrays.

BUG=skia:4182

Review URL: https://codereview.chromium.org/1275853005
2015-08-12 09:40:47 -07:00
halcanary
65cc3e4644 C API: add radial, sweep, and two-point conical gradient shaders
Review URL: https://codereview.chromium.org/1263773006
2015-08-12 07:37:34 -07:00
scroggo
b427db1d45 Consolidate SkCodec functions for handling rewind
Previously, many of our codec implementations followed the same
pattern (often in a function named handleRewind):

switch (this->rewindIfNeeded()) {
  case CouldNotRewind:
    return CouldNotRewind;
  case NoRewindNecessary:
    // keep going
    break;
  case Rewound:
     <re-read header etc>
    break;
}

In this CL, remove the enum, and put the piece that happens in the
Rewound case into a virtual function, onRewind. rewindIfNeeded now
contains the common pieces from various functions named handleRewind.

In SkBmpCodec, add a function that returns whether the BMP is in ICO,
so it can have a common implementation for onRewind.

BUG=skia:3257

Review URL: https://codereview.chromium.org/1288483002
2015-08-12 07:24:13 -07:00
reed
9cdcabefa3 Revert[3] "move some public headers into private"
This reverts commit 9d20ee57d7.

BUG=skia:
TBR=

failures here: https://codereview.chromium.org/1286103004

Review URL: https://codereview.chromium.org/1290733002
2015-08-12 05:33:12 -07:00
reed
9d20ee57d7 Revert[2] "move some public headers into private"
This reverts commit 4cf9e7e147.

BUG=skia:
TBR=
NOTRY=True

Review URL: https://codereview.chromium.org/1284173002
2015-08-12 04:42:08 -07:00
bsalomon
a387a11f9e Make GrBatch carry its own GrPipeline
Review URL: https://codereview.chromium.org/1278643006
2015-08-11 14:47:42 -07:00
reed
4cf9e7e147 Revert "move some public headers into private"
This reverts commit eedf0fb204.

BUG=skia:
TBR=
NOTRY=True

Review URL: https://codereview.chromium.org/1270313005
2015-08-11 08:39:18 -07:00
reed
eedf0fb204 move some public headers into private
BUG=skia:

Review URL: https://codereview.chromium.org/1289483002
2015-08-11 07:15:00 -07:00
joshualitt
b7ee1bf017 trivial CL to add drawBatch to GrDrawContext
TBR=bsalomon@google.com
BUG=skia:

Review URL: https://codereview.chromium.org/1282883002
2015-08-10 11:59:03 -07:00
joshualitt
14205b114a Expand functionality of GrRectBatchFactory with AARects
BUG=skia:

Review URL: https://codereview.chromium.org/1279303002
2015-08-10 11:40:56 -07:00
reed
021f631dc6 api helpers inspired by blink use-cases
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1278323002
2015-08-09 19:41:13 -07:00
reed
41838a0194 remove unneeded _DRAWIMAGERECT flags
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1281123002
2015-08-07 19:09:09 -07:00
jvanverth
31ff762dc8 First pass at drawAtlas batching.
Moves drawAtlas setup into its own method in GrDrawContext, and adds
DrawAtlasBatch.
Uses pre-built index buffer for quads.

TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1277933003
2015-08-07 10:09:28 -07:00
joshualitt
922c8b13c5 Break LCD and Bitmap text dependency on hardcoded atlas values
BUG=skia:

Committed: https://skia.googlesource.com/skia/+/846b022f6b469cfde285372f26e0d5c593d122ac

Review URL: https://codereview.chromium.org/1271873002
2015-08-07 09:55:23 -07:00
mtklein
469a3fe6ed Add approxBytesUsed to hashes.
BUG=skia:

Review URL: https://codereview.chromium.org/1280653003
2015-08-07 09:33:37 -07:00
mtklein
3848427d88 The compiler can generate smulbb perfectly well nowadays.
BUG=skia:4117

Review URL: https://codereview.chromium.org/1273203002
2015-08-07 08:48:12 -07:00
mtklein
765d6ad975 __ARM_NEON is defined both by ARMv8 and ARMv7 + -mfpu=neon.
Can't hurt to simplify a little.

BUG=skia:4117

Review URL: https://codereview.chromium.org/1274513003
2015-08-06 11:17:06 -07:00
egdaniel
51c8d409ad Move some work from backend onClear to base class clear
BUG=skia:

Review URL: https://codereview.chromium.org/1275543005
2015-08-06 10:54:13 -07:00
senorblanco
b4f9d0ec6c Implement caching of stroked paths in the tessellating path renderer.
This requires adding the stroke info to the cache key, and doing the
stroking and dashing before rendering as triangles.

BUG=skia:3755

Committed: https://skia.googlesource.com/skia/+/29e0d3f267a03546f236023347cdb4595ece2fd1

Review URL: https://codereview.chromium.org/1275553002
2015-08-06 10:28:55 -07:00
reed
e47829b6b1 flag to use const& instead of const* for src-rect
BUG=skia:

Review URL: https://codereview.chromium.org/1272713005
2015-08-06 10:02:53 -07:00
robertphillips
d0cf9d831f Remove SK_LEGACY_SKPOINT3_CTORS flag
Cannot land before Blink https://codereview.chromium.org/1274673002/ (Remove reliance on legacy Skia SkPoint3 ctors in FELighting.cpp)

Review URL: https://codereview.chromium.org/1269383003
2015-08-06 07:08:31 -07:00
bungeman
d3ebb48320 IWYU: 'core' target, files starting A-C.
TBR=reed@google.com
Verbal lgtm, does not change API.

Committed: https://skia.googlesource.com/skia/+/7403d87db8e43d4c2b5b25ac22a0ebc22bd09d69

Review URL: https://codereview.chromium.org/1265033002
2015-08-05 13:57:49 -07:00
senorblanco
59cd36765c Revert of Implement caching of stroked paths in the tessellated path renderer. (patchset #4 id:60001 of https://codereview.chromium.org/1275553002/ )
Reason for revert:
Breaking/asserting in Debug on DM.

Original issue's description:
> Implement caching of stroked paths in the tessellated path renderer.
>
> This requires adding the stroke info to the cache key, and doing the
> stroking and dashing before rendering as triangles.
>
> BUG=skia:3755
>
> Committed: https://skia.googlesource.com/skia/+/29e0d3f267a03546f236023347cdb4595ece2fd1

TBR=bsalomon@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:3755

Review URL: https://codereview.chromium.org/1276633002
2015-08-05 13:37:49 -07:00
senorblanco
29e0d3f267 Implement caching of stroked paths in the tessellated path renderer.
This requires adding the stroke info to the cache key, and doing the
stroking and dashing before rendering as triangles.

BUG=skia:3755

Review URL: https://codereview.chromium.org/1275553002
2015-08-05 13:18:03 -07:00
bungeman
2bd028590d Add skstd::move and skstd::forward.
Since we can't use the c++11 standard library, re-implement the bits
we want to use now.

TBR=reed@google.com
The next CL is try to move SkTemplates into private.

Review URL: https://codereview.chromium.org/1273813002
2015-08-05 12:09:57 -07:00
joshualitt
2fe7923f7e Expose coord transforms from GrPipeline
BUG=skia:

Review URL: https://codereview.chromium.org/1275603002
2015-08-05 12:02:27 -07:00
joshualitt
847029043e fix for GrFragmentProcessor isEqual in GrPipeline
BUG=skia:

Review URL: https://codereview.chromium.org/1273693003
2015-08-05 09:30:02 -07:00
joshualitt
9162ea9444 Revert of Break LCD and Bitmap text dependency on hardcoded atlas values (patchset #2 id:20001 of https://codereview.chromium.org/1271873002/ )
Reason for revert:
Breaks S3

Original issue's description:
> Break LCD and Bitmap text dependency on hardcoded atlas values
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/846b022f6b469cfde285372f26e0d5c593d122ac

TBR=jvanverth@google.com,bsalomon@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1271163003
2015-08-05 06:46:09 -07:00
reed
fb8c1fcab1 Revert of IWYU: 'core' target, files starting A-C. (patchset #5 id:80001 of https://codereview.chromium.org/1265033002/ )
Reason for revert:
revert to unblock DEPS roll

../../chrome/browser/chromeos/display/overscan_calibrator.cc:43:10: error: variable has incomplete type 'SkPath'
  SkPath base_path;

Original issue's description:
> IWYU: 'core' target, files starting A-C.
>
> TBR=reed@google.com
> Verbal lgtm, does not change API.
>
> Committed: https://skia.googlesource.com/skia/+/7403d87db8e43d4c2b5b25ac22a0ebc22bd09d69

TBR=reed@google.com,mtklein@google.com,bungeman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1273613002
2015-08-04 18:44:57 -07:00
bungeman
7403d87db8 IWYU: 'core' target, files starting A-C.
TBR=reed@google.com
Verbal lgtm, does not change API.

Review URL: https://codereview.chromium.org/1265033002
2015-08-04 14:56:53 -07:00
fmalita
1dedc3d2c0 SkPictureImageGenerator
R=reed@google.com

Review URL: https://codereview.chromium.org/1240093004
2015-08-04 13:53:14 -07:00
senorblanco
84cd621670 Implement caching of filled paths in the tessellated path renderer.
Paths are cached as tessellated triangle meshes in vertex buffers on the GPU. Stroked paths are not (yet) cached.

Paths containing no curved segments (linear paths) are reused at all scales. Paths containing curved segments are reused within a scale tolerance threshold.

In order to invalidate the cache when an SkPath is changed or deleted,
this required implementing genID change notification in SkPath. This is
modelled almost exactly on SkPixelRef::GenIDChangeListener.
However, It does not currently implement the check for unique genIDs,
so notifiers will fire when the first instance of an SkPathRef
using a given genID is destroyed.

Another caveat is that you cannot successfully add a change notifier
to an empty path, since it uses the "canonical" empty path which is
never modified or destroyed. For this reason, we prevent adding
listeners to it.

BUG=skia:4121,skia:4122, 497403
DOCS_PREVIEW= https://skia.org/?cl=1114353004

Committed: https://skia.googlesource.com/skia/+/468dfa72eb6694145487be17876804dfca3b7adb

Review URL: https://codereview.chromium.org/1114353004
2015-08-04 10:01:58 -07:00
joshualitt
846b022f6b Break LCD and Bitmap text dependency on hardcoded atlas values
BUG=skia:

Review URL: https://codereview.chromium.org/1271873002
2015-08-04 09:40:03 -07:00
scroggo
1c005e4a38 Create a scanline decoder without creating a codec
Prior to this CL, if a client wanted to decode scanlines, they had to
create an SkCodec in order to get an SkScanlineDecoder. This introduces
complications if input data is not easily shared between the two
objects.

Instead, add methods to SkScanlineDecoder for creating a new one from
input data, and remove the creation functions from SkCodec.

Update DM and tests.

Review URL: https://codereview.chromium.org/1267583002
2015-08-04 09:24:45 -07:00
mtklein
562a66b093 Revert "Implement caching of filled paths in the tessellated path renderer."
This reverts commit 468dfa72eb.

    This CL caused signficant GM diffs.

Revert "Fix resource cache test."
This reverts commit b001c41ed3.
Revert "Fix SkData leaks at GrResourceKey::setCustomData() call sites."
This reverts commit c369348aa5.

    These CLs depend on the first one.

BUG=skia:
TBR=bsalomon@google.com

Review URL: https://codereview.chromium.org/1260363007
2015-08-04 08:46:16 -07:00
reed
6f1216ac15 cache private readback for gpu-images
Does not try to cache calls to readPixels at the moment:
- not triggered by drawing
- not clear if we want to perform any pixel transformations (that readPixels allows) on the GPU or CPU

Can consider that another time.

BUG=513695

Review URL: https://codereview.chromium.org/1262923003
2015-08-04 08:10:13 -07:00
wangyix
4b3050b410 Added registerChild; transforms, textures, glKey automatically handled.
BUG=skia:

Review URL: https://codereview.chromium.org/1266633003
2015-08-04 07:59:37 -07:00
senorblanco
468dfa72eb Implement caching of filled paths in the tessellated path renderer.
Paths are cached as tessellated triangle meshes in vertex buffers on the GPU. Stroked paths are not (yet) cached.

Paths containing no curved segments (linear paths) are reused at all scales. Paths containing curved segments are reused within a scale tolerance threshold.

In order to invalidate the cache when an SkPath is changed or deleted,
this required implementing genID change notification in SkPath. This is
modelled almost exactly on SkPixelRef::GenIDChangeListener.
However, It does not currently implement the check for unique genIDs,
so notifiers will fire when the first instance of an SkPathRef
using a given genID is destroyed.

Another caveat is that you cannot successfully add a change notifier
to an empty path, since it uses the "canonical" empty path which is
never modified or destroyed. For this reason, we prevent adding
listeners to it.

BUG=skia:4121,skia:4122, 497403
DOCS_PREVIEW= https://skia.org/?cl=1114353004

Review URL: https://codereview.chromium.org/1114353004
2015-08-03 13:04:03 -07:00
joshualitt
17d833b05b Add abliity to set textblob cache budget to GrContext
BUG=skia:

Review URL: https://codereview.chromium.org/1264283002
2015-08-03 10:17:44 -07:00
reed
c2e6827952 remove now-dead flags
BUG=skia:

Review URL: https://codereview.chromium.org/1258963005
2015-08-01 07:03:20 -07:00
halcanary
80a1c54740 C API: remove dead code, simplify boilerplate
Review URL: https://codereview.chromium.org/1261953006
2015-07-31 15:16:23 -07:00
mtklein
bdb34d0345 Move SkOpts.h back to src/core.
The Chrome opts targets (sse2, ssse3, sse41, etc) don't have include/private on
their include path.  This should unblock the roll.

TBR=reed@google.com

BUG=skia:4117

Review URL: https://codereview.chromium.org/1268853007
2015-07-31 14:02:36 -07:00