diff --git a/.gitignore b/.gitignore index bfc1056590328..016db8f901e59 100644 --- a/.gitignore +++ b/.gitignore @@ -218,6 +218,7 @@ v8.log /net/Release /net/testserver.log /out* +/ozone /ppapi/native_client/nacl_irt.xml /ppapi/native_client/ppapi_lib.xml /remoting/appengine/ @@ -312,6 +313,7 @@ v8.log /third_party/junit/src /third_party/kasko /third_party/khronos_glcts +/third_party/khronos/CL /third_party/leveldatabase/src /third_party/leveldb /third_party/libaddressinput/src @@ -383,6 +385,7 @@ v8.log /third_party/valgrind /third_party/v4l2capture /third_party/web-animations-js +/third_party/webcl /third_party/webdriver/pylib /third_party/webdriver/python/selenium /third_party/webgl @@ -434,3 +437,4 @@ v8.log /win8/metro_driver/metro_driver_version_resources.xml /x86-generic_out/ /xcodebuild +/xwalk diff --git a/DEPS b/DEPS index b9bff2a7962a0..4fe8329b58fce 100644 --- a/DEPS +++ b/DEPS @@ -1,766 +1,676 @@ -# This file is used to manage the dependencies of the Chromium src repo. It is -# used by gclient to determine what version of each dependency to check out, and -# where. -# -# For more information, please refer to the official documentation: -# https://sites.google.com/a/chromium.org/dev/developers/how-tos/get-the-code -# -# When adding a new dependency, please update the top-level .gitignore file -# to list the dependency's destination directory. -# -# ----------------------------------------------------------------------------- -# Rolling deps -# ----------------------------------------------------------------------------- -# All repositories in this file are git-based, using Chromium git mirrors where -# necessary (e.g., a git mirror is used when the source project is SVN-based). -# To update the revision that Chromium pulls for a given dependency: -# -# # Create and switch to a new branch -# git new-branch depsroll -# # Run roll-dep (provided by depot_tools) giving the dep's path and the -# # desired SVN revision number (e.g., third_party/foo/bar and a revision such -# # number from Subversion) -# roll-dep third_party/foo/bar REVISION_NUMBER -# # You should now have a modified DEPS file; commit and upload as normal -# git commit -a -# git cl upload - - vars = { - # Use this googlecode_url variable only if there is an internal mirror for it. - # If you do not know, use the full path while defining your new deps entry. - 'googlecode_url': 'http://%s.googlecode.com/svn', - 'sourceforge_url': 'http://svn.code.sf.net/p/%(repo)s/code', - 'llvm_url': 'http://src.chromium.org/llvm-project', - 'llvm_git': 'https://llvm.googlesource.com', - 'webkit_trunk': 'http://src.chromium.org/blink/trunk', - 'webkit_revision': '117dbc2c497be4e52ff643575d6438febfa9053e', # from svn revision 195420 - 'chromium_git': 'https://chromium.googlesource.com', - 'chromiumos_git': 'https://chromium.googlesource.com/chromiumos', - 'pdfium_git': 'https://pdfium.googlesource.com', - 'skia_git': 'https://skia.googlesource.com', - 'boringssl_git': 'https://boringssl.googlesource.com', - 'libvpx_revision': 'd1c022c097f22987d521643c4802b623e572393a', - 'sfntly_revision': '1bdaae8fc788a5ac8936d68bf24f37d977a13dac', - 'skia_revision': '465706820d0d373f76ab4831c286115ee0d86b7a', - # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling Skia - # and V8 without interference from each other. - 'v8_branch': 'trunk', - 'v8_revision': '2e4c5505e85d94b520e853dda3f0cc3f2769e5f0', - # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling WebRTC - # and V8 without interference from each other. - # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling swarming_client - # and whatever else without interference from each other. - 'swarming_revision': 'b39a448d8522392389b28f6997126a6ab04bfe87', - # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling ANGLE - # and whatever else without interference from each other. - 'angle_revision': '21ce9b02de90b81d3c3fab95f02ad45fbffd7350', - # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling build tools - # and whatever else without interference from each other. - 'buildtools_revision': 'b73e5f70d7ac6be98fb2555461f631afc90216ce', - # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling PDFium - # and whatever else without interference from each other. - 'pdfium_revision': 'f33cdd54d5d5340d8a662048d9cf4abe7d5f0488', - # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling openmax_dl - # and whatever else without interference from each other. - 'openmax_dl_revision': '22bb1085a6a0f6f3589a8c3d60ed0a9b82248275', - # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling BoringSSL - # and whatever else without interference from each other. - 'boringssl_revision': 'a07c0fc8f2181d086b1118712e2ceb0d1496fa0b', - # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling nss - # and whatever else without interference from each other. - 'nss_revision': '95068068df410e398ac221a9195c999b22bd63e9', # from svn revision 294785 - # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling google-toolbox-for-mac - # and whatever else without interference from each other. - 'google_toolbox_for_mac_revision': 'ce47a231ea0b238fbe95538e86cc61d74c234be6', # from svn revision 705 - # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling lighttpd - # and whatever else without interference from each other. - 'lighttpd_revision': '9dfa55d15937a688a92cbf2b7a8621b0927d06eb', - # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling lss - # and whatever else without interference from each other. - 'lss_revision': '6f97298fe3794e92c8c896a6bc06e0b36e4c3de3', - # Three lines of non-changing comments so that - # the commit queue can handle CLs rolling NaCl - # and whatever else without interference from each other. - 'nacl_revision': '862ca265aa1fdcabe8b3ab518251381bfbf48468', + 'angle_revision': + '21ce9b02de90b81d3c3fab95f02ad45fbffd7350', + 'boringssl_git': + 'https://boringssl.googlesource.com', + 'boringssl_revision': + 'a07c0fc8f2181d086b1118712e2ceb0d1496fa0b', + 'buildspec_platforms': + 'all', + 'buildtools_revision': + 'b73e5f70d7ac6be98fb2555461f631afc90216ce', + 'chromium_git': + 'https://chromium.googlesource.com', + 'chromiumos_git': + 'https://chromium.googlesource.com/chromiumos', + 'google_toolbox_for_mac_revision': + 'ce47a231ea0b238fbe95538e86cc61d74c234be6', + 'googlecode_url': + 'http://%s.googlecode.com/svn', + 'libvpx_revision': + 'd1c022c097f22987d521643c4802b623e572393a', + 'lighttpd_revision': + '9dfa55d15937a688a92cbf2b7a8621b0927d06eb', + 'llvm_git': + 'https://llvm.googlesource.com', + 'llvm_url': + 'http://src.chromium.org/llvm-project', + 'lss_revision': + '6f97298fe3794e92c8c896a6bc06e0b36e4c3de3', + 'nacl_revision': + '862ca265aa1fdcabe8b3ab518251381bfbf48468', + 'nss_revision': + '95068068df410e398ac221a9195c999b22bd63e9', + 'openmax_dl_revision': + '22bb1085a6a0f6f3589a8c3d60ed0a9b82248275', + 'pdfium_git': + 'https://pdfium.googlesource.com', + 'pdfium_revision': + 'f33cdd54d5d5340d8a662048d9cf4abe7d5f0488', + 'sfntly_revision': + '1bdaae8fc788a5ac8936d68bf24f37d977a13dac', + 'skia_git': + 'https://skia.googlesource.com', + 'skia_revision': + '465706820d0d373f76ab4831c286115ee0d86b7a', + 'sourceforge_url': + 'http://svn.code.sf.net/p/%(repo)s/code', + 'swarming_revision': + 'b39a448d8522392389b28f6997126a6ab04bfe87', + 'v8_branch': + 'trunk', + 'v8_revision': + '2e4c5505e85d94b520e853dda3f0cc3f2769e5f0', + 'webkit_revision': + '117dbc2c497be4e52ff643575d6438febfa9053e', + 'webkit_trunk': + 'http://src.chromium.org/blink/trunk' } -# Only these hosts are allowed for dependencies in this DEPS file. -# If you need to add a new host, contact chrome infrastracture team. allowed_hosts = [ - 'chromium.googlesource.com', - 'boringssl.googlesource.com', - 'pdfium.googlesource.com', 'android.googlesource.com', + 'boringssl.googlesource.com', + 'chromium.googlesource.com', + 'pdfium.googlesource.com' ] deps = { 'src/breakpad/src': - Var('chromium_git') + '/external/google-breakpad/src.git' + '@' + '9fcbe255a64d39295ad5f1f15c0b92db3da83c0f', # from svn revision 1454 - + (Var("chromium_git")) + '/external/google-breakpad/src.git@9fcbe255a64d39295ad5f1f15c0b92db3da83c0f', 'src/buildtools': - Var('chromium_git') + '/chromium/buildtools.git' + '@' + Var('buildtools_revision'), - + (Var("chromium_git")) + '/chromium/buildtools.git@b73e5f70d7ac6be98fb2555461f631afc90216ce', + 'src/chrome/test/data/perf/canvas_bench': + (Var("chromium_git")) + '/chromium/canvas_bench.git@a7b40ea5ae0239517d78845a5fc9b12976bfc732', + 'src/chrome/test/data/perf/frame_rate/content': + (Var("chromium_git")) + '/chromium/frame_rate/content.git@c10272c88463efeef6bb19c9ec07c42bc8fe22b9', + 'src/media/cdm/ppapi/api': + (Var("chromium_git")) + '/chromium/cdm.git@7377023e384f296cbb27644eb2c485275f1f92e8', + 'src/native_client': + (Var("chromium_git")) + '/native_client/src/native_client.git@862ca265aa1fdcabe8b3ab518251381bfbf48468', 'src/sdch/open-vcdiff': - Var('chromium_git') + '/external/open-vcdiff.git' + '@' + '438f2a5be6d809bc21611a94cd37bfc8c28ceb33', # from svn revision 41 - - 'src/testing/gtest': - Var('chromium_git') + '/external/googletest.git' + '@' + '23574bf2333f834ff665f894c97bef8a5b33a0a9', # from svn revision 711 - + (Var("chromium_git")) + '/external/open-vcdiff.git@438f2a5be6d809bc21611a94cd37bfc8c28ceb33', 'src/testing/gmock': - Var('chromium_git') + '/external/googlemock.git' + '@' + '29763965ab52f24565299976b936d1265cb6a271', # from svn revision 501 - + (Var("chromium_git")) + '/external/googlemock.git@29763965ab52f24565299976b936d1265cb6a271', + 'src/testing/gtest': + (Var("chromium_git")) + '/external/googletest.git@23574bf2333f834ff665f894c97bef8a5b33a0a9', + 'src/third_party/WebKit': + (Var("chromium_git")) + '/chromium/blink.git@607abbc77d316988d9121937b7e21d4d3ca51698', 'src/third_party/angle': - Var('chromium_git') + '/angle/angle.git' + '@' + Var('angle_revision'), - + (Var("chromium_git")) + '/angle/angle.git@fa9744b09e2478c75a25fd1b497469d429e81591', + 'src/third_party/bidichecker': + (Var("chromium_git")) + '/external/bidichecker/lib.git@97f2aa645b74c28c57eca56992235c79850fa9e0', + 'src/third_party/boringssl/src': + (Var("boringssl_git")) + '/boringssl.git@a07c0fc8f2181d086b1118712e2ceb0d1496fa0b', + 'src/third_party/cacheinvalidation/src': + (Var("chromium_git")) + '/external/google-cache-invalidation-api/src.git@0fbfe801cca467fa986ebe08d34012342aa47e55', + 'src/third_party/cld_2/src': + (Var("chromium_git")) + '/external/cld2.git@14d9ef8d4766326f8aa7de54402d1b9c782d4481', 'src/third_party/colorama/src': - Var('chromium_git') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', - + (Var("chromium_git")) + '/external/colorama.git@799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', 'src/third_party/crashpad/crashpad': - Var('chromium_git') + '/crashpad/crashpad.git' + '@' + '00c42ae7bdcf40d15c02b87e088c1eb565a51333', - - 'src/third_party/trace-viewer': - Var('chromium_git') + '/external/trace-viewer.git' + '@' + 'e2b5374c4941c450b168d4c7d9110fb91b2d4c19', - - 'src/third_party/WebKit': - Var('chromium_git') + '/chromium/blink.git' + '@' + Var('webkit_revision'), - - 'src/third_party/icu': - Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '5788e2736b3bc642994b6351a6096124895afa01', - - 'src/third_party/libexif/sources': - Var('chromium_git') + '/chromium/deps/libexif/sources.git' + '@' + 'ed98343daabd7b4497f97fda972e132e6877c48a', - - 'src/third_party/hunspell_dictionaries': - Var('chromium_git') + '/chromium/deps/hunspell_dictionaries.git' + '@' + '80796932b89ab36431399d76c5b8391ea471e30a', # from svn revision 294404 - - 'src/third_party/safe_browsing/testing': - Var('chromium_git') + '/external/google-safe-browsing/testing.git' + '@' + '9d7e8064f3ca2e45891470c9b5b1dce54af6a9d6', - - 'src/third_party/cacheinvalidation/src': - Var('chromium_git') + '/external/google-cache-invalidation-api/src.git' + '@' + '0fbfe801cca467fa986ebe08d34012342aa47e55', # from svn revision 342 - - 'src/third_party/leveldatabase/src': - Var('chromium_git') + '/external/leveldb.git' + '@' + '251ebf5dc70129ad3c38193fe6c99a5b0ec6b9fa', - - 'src/third_party/snappy/src': - Var('chromium_git') + '/external/snappy.git' + '@' + '762bb32f0c9d2f31ba4958c7c0933d22e80c20bf', - - 'src/tools/grit': - Var('chromium_git') + '/external/grit-i18n.git' + '@' + 'c1b1591a05209c1ad467e845ba8543c22f9072af', # from svn revision 189 - - 'src/tools/gyp': - Var('chromium_git') + '/external/gyp.git' + '@' + '0bb67471bca068996e15b56738fa4824dfa19de0', - - 'src/tools/swarming_client': - Var('chromium_git') + '/external/swarming.client.git' + '@' + Var('swarming_revision'), - - 'src/v8': - Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), - - 'src/native_client': - Var('chromium_git') + '/native_client/src/native_client.git' + '@' + Var('nacl_revision'), - - 'src/third_party/sfntly/cpp/src': - Var('chromium_git') + '/external/sfntly/cpp/src.git' + '@' + Var('sfntly_revision'), - - 'src/third_party/skia': - Var('chromium_git') + '/skia.git' + '@' + Var('skia_revision'), - - 'src/tools/page_cycler/acid3': - Var('chromium_git') + '/chromium/deps/acid3.git' + '@' + '6be0a66a1ebd7ebc5abc1b2f405a945f6d871521', - - 'src/chrome/test/data/perf/canvas_bench': - Var('chromium_git') + '/chromium/canvas_bench.git' + '@' + 'a7b40ea5ae0239517d78845a5fc9b12976bfc732', - - 'src/chrome/test/data/perf/frame_rate/content': - Var('chromium_git') + '/chromium/frame_rate/content.git' + '@' + 'c10272c88463efeef6bb19c9ec07c42bc8fe22b9', - - 'src/third_party/bidichecker': - Var('chromium_git') + '/external/bidichecker/lib.git' + '@' + '97f2aa645b74c28c57eca56992235c79850fa9e0', - - 'src/third_party/webgl/src': - Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '1e318b3f0ad952d22477151eec98d37fa08e5bc7', - - 'src/third_party/webdriver/pylib': - Var('chromium_git') + '/external/selenium/py.git' + '@' + '5fd78261a75fe08d27ca4835fb6c5ce4b42275bd', - - 'src/third_party/libvpx': - Var('chromium_git') + '/chromium/deps/libvpx.git' + '@' + Var('libvpx_revision'), - + (Var("chromium_git")) + '/crashpad/crashpad.git@00c42ae7bdcf40d15c02b87e088c1eb565a51333', + 'src/third_party/dom_distiller_js/dist': + (Var("chromium_git")) + '/external/github.com/chromium/dom-distiller-dist.git@4948eb81dc84578e58a59b8ef493ce946cd00b0f', 'src/third_party/ffmpeg': - Var('chromium_git') + '/chromium/third_party/ffmpeg.git' + '@' + 'c0f05636c4472e5d3c0045ec34464aec46c5fb70', - - 'src/third_party/libjingle/source/talk': - Var('chromium_git') + '/external/webrtc/trunk/talk.git' + '@' + 'a8c78249e7843c24bf24be555eae7fe9e49ef9b8', # commit position 9186 - - 'src/third_party/usrsctp/usrsctplib': - Var('chromium_git') + '/external/usrsctplib.git' + '@' + '36444a999739e9e408f8f587cb4c3ffeef2e50ac', # from svn revision 9215 - - 'src/third_party/libsrtp': - Var('chromium_git') + '/chromium/deps/libsrtp.git' + '@' + '9c53f858cddd4d890e405e91ff3af0b48dfd90e6', # from svn revision 295151 - - 'src/third_party/yasm/source/patched-yasm': - Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git' + '@' + '4671120cd8558ce62ee8672ebf3eb6f5216f909b', - - 'src/third_party/libjpeg_turbo': - Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + '8ee9bdd068effcf5fe876e401829eadb94569750', - + (Var("chromium_git")) + '/chromium/third_party/ffmpeg.git@cc2ec2825b0cc25cf27c5843847e7028c1cdb075', 'src/third_party/flac': - Var('chromium_git') + '/chromium/deps/flac.git' + '@' + '0635a091379d9677f1ddde5f2eec85d0f096f219', - - 'src/third_party/pyftpdlib/src': - Var('chromium_git') + '/external/pyftpdlib.git' + '@' + '2be6d65e31c7ee6320d059f581f05ae8d89d7e45', - - 'src/third_party/scons-2.0.1': - Var('chromium_git') + '/native_client/src/third_party/scons-2.0.1.git' + '@' + '1c1550e17fc26355d08627fbdec13d8291227067', - - 'src/third_party/webrtc': - Var('chromium_git') + '/external/webrtc/trunk/webrtc.git' + '@' + '872cf25862abf08286abd5c73cc30044ac19b033', # commit position 9189 - - 'src/third_party/openmax_dl': - Var('chromium_git') + '/external/webrtc/deps/third_party/openmax.git' + '@' + Var('openmax_dl_revision'), - + (Var("chromium_git")) + '/chromium/deps/flac.git@0635a091379d9677f1ddde5f2eec85d0f096f219', + 'src/third_party/hunspell_dictionaries': + (Var("chromium_git")) + '/chromium/deps/hunspell_dictionaries.git@80796932b89ab36431399d76c5b8391ea471e30a', + 'src/third_party/icu': + (Var("chromium_git")) + '/chromium/deps/icu.git@f1ad7f9ba957571dc692ea3e187612c685615e19', 'src/third_party/jsoncpp/source': - Var('chromium_git') + '/external/github.com/open-source-parsers/jsoncpp.git' + '@' + 'f572e8e42e22cfcf5ab0aea26574f408943edfa4', # from svn 248 - - 'src/third_party/libyuv': - Var('chromium_git') + '/external/libyuv.git' + '@' + '35aa92a1ea1bbcca6bf97e69e7a65f1caa987675', # from svn revision 1385 - - 'src/third_party/smhasher/src': - Var('chromium_git') + '/external/smhasher.git' + '@' + 'e87738e57558e0ec472b2fc3a643b838e5b6e88f', - + (Var("chromium_git")) + '/external/github.com/open-source-parsers/jsoncpp.git@f572e8e42e22cfcf5ab0aea26574f408943edfa4', + 'src/third_party/leveldatabase/src': + (Var("chromium_git")) + '/external/leveldb.git@251ebf5dc70129ad3c38193fe6c99a5b0ec6b9fa', 'src/third_party/libaddressinput/src': - Var('chromium_git') + '/external/libaddressinput.git' + '@' + '61f63da7ae6fa469138d60dec5d6bbecc6ab43d6', - - # These are all at libphonenumber r728. + (Var("chromium_git")) + '/external/libaddressinput.git@61f63da7ae6fa469138d60dec5d6bbecc6ab43d6', + 'src/third_party/libexif/sources': + (Var("chromium_git")) + '/chromium/deps/libexif/sources.git@ed98343daabd7b4497f97fda972e132e6877c48a', + 'src/third_party/libjingle/source/talk': + (Var("chromium_git")) + '/external/webrtc/trunk/talk.git@411c9af27df0d133df43df2d1a49962b56f7d7ac', + 'src/third_party/libjpeg_turbo': + (Var("chromium_git")) + '/chromium/deps/libjpeg_turbo.git@8ee9bdd068effcf5fe876e401829eadb94569750', 'src/third_party/libphonenumber/src/phonenumbers': - Var('chromium_git') + '/external/libphonenumber/cpp/src/phonenumbers.git' + '@' + '0d6e3e50e17c94262ad1ca3b7d52b11223084bca', - 'src/third_party/libphonenumber/src/test': - Var('chromium_git') + '/external/libphonenumber/cpp/test.git' + '@' + 'f351a7e007f9c9995494499120bbc361ca808a16', + (Var("chromium_git")) + '/external/libphonenumber/cpp/src/phonenumbers.git@0d6e3e50e17c94262ad1ca3b7d52b11223084bca', 'src/third_party/libphonenumber/src/resources': - Var('chromium_git') + '/external/libphonenumber/resources.git' + '@' + 'b6dfdc7952571ff7ee72643cd88c988cbe966396', - - 'src/tools/deps2git': - Var('chromium_git') + '/chromium/tools/deps2git.git' + '@' + 'f04828eb0b5acd3e7ad983c024870f17f17b06d9', - - 'src/third_party/webpagereplay': - Var('chromium_git') + '/external/github.com/chromium/web-page-replay.git' + '@' + 'e53550b73e8e098938a651bc8ceb3681e5980567', - - 'src/third_party/pywebsocket/src': - Var('chromium_git') + '/external/pywebsocket/src.git' + '@' + 'cb349e87ddb30ff8d1fa1a89be39cec901f4a29c', - - 'src/third_party/opus/src': - Var('chromium_git') + '/chromium/deps/opus.git' + '@' + 'cae696156f1e60006e39821e79a1811ae1933c69', - - 'src/media/cdm/ppapi/api': - Var('chromium_git') + '/chromium/cdm.git' + '@' + '7377023e384f296cbb27644eb2c485275f1f92e8', # from svn revision 294518 - + (Var("chromium_git")) + '/external/libphonenumber/resources.git@b6dfdc7952571ff7ee72643cd88c988cbe966396', + 'src/third_party/libphonenumber/src/test': + (Var("chromium_git")) + '/external/libphonenumber/cpp/test.git@f351a7e007f9c9995494499120bbc361ca808a16', + 'src/third_party/libsrtp': + (Var("chromium_git")) + '/chromium/deps/libsrtp.git@9c53f858cddd4d890e405e91ff3af0b48dfd90e6', + 'src/third_party/libvpx': + (Var("chromium_git")) + '/chromium/deps/libvpx.git@9ee3785876600dc2f3a6291557235feee99b1ad2', + 'src/third_party/libyuv': + (Var("chromium_git")) + '/external/libyuv.git@35aa92a1ea1bbcca6bf97e69e7a65f1caa987675', 'src/third_party/mesa/src': - Var('chromium_git') + '/chromium/deps/mesa.git' + '@' + '071d25db04c23821a12a8b260ab9d96a097402f0', - - 'src/third_party/cld_2/src': - Var('chromium_git') + '/external/cld2.git' + '@' + '14d9ef8d4766326f8aa7de54402d1b9c782d4481', # from svn revision 193 - + (Var("chromium_git")) + '/chromium/deps/mesa.git@071d25db04c23821a12a8b260ab9d96a097402f0', + 'src/third_party/openmax_dl': + (Var("chromium_git")) + '/external/webrtc/deps/third_party/openmax.git@22bb1085a6a0f6f3589a8c3d60ed0a9b82248275', + 'src/third_party/opus/src': + (Var("chromium_git")) + '/chromium/deps/opus.git@cae696156f1e60006e39821e79a1811ae1933c69', 'src/third_party/pdfium': - 'https://pdfium.googlesource.com/pdfium.git' + '@' + Var('pdfium_revision'), - - 'src/third_party/boringssl/src': - 'https://boringssl.googlesource.com/boringssl.git' + '@' + Var('boringssl_revision'), - + (Var("pdfium_git")) + '/pdfium.git@3ecc289ce0d1a639a9b3f6c59d10952269692d04', 'src/third_party/py_trace_event/src': - Var('chromium_git') + '/external/py_trace_event.git' + '@' + 'dd463ea9e2c430de2b9e53dea57a77b4c3ac9b30', - - 'src/third_party/dom_distiller_js/dist': - Var('chromium_git') + '/external/github.com/chromium/dom-distiller-dist.git' + '@' + '4948eb81dc84578e58a59b8ef493ce946cd00b0f', + (Var("chromium_git")) + '/external/py_trace_event.git@dd463ea9e2c430de2b9e53dea57a77b4c3ac9b30', + 'src/third_party/pyftpdlib/src': + (Var("chromium_git")) + '/external/pyftpdlib.git@2be6d65e31c7ee6320d059f581f05ae8d89d7e45', + 'src/third_party/pywebsocket/src': + (Var("chromium_git")) + '/external/pywebsocket/src.git@cb349e87ddb30ff8d1fa1a89be39cec901f4a29c', + 'src/third_party/safe_browsing/testing': + (Var("chromium_git")) + '/external/google-safe-browsing/testing.git@9d7e8064f3ca2e45891470c9b5b1dce54af6a9d6', + 'src/third_party/scons-2.0.1': + (Var("chromium_git")) + '/native_client/src/third_party/scons-2.0.1.git@1c1550e17fc26355d08627fbdec13d8291227067', + 'src/third_party/sfntly/cpp/src': + (Var("chromium_git")) + '/external/sfntly/cpp/src.git@1bdaae8fc788a5ac8936d68bf24f37d977a13dac', + 'src/third_party/skia': + (Var("chromium_git")) + '/skia.git@f2b95f63de2ec93ef0cb1c3bbcef88cf0c0368f5', + 'src/third_party/smhasher/src': + (Var("chromium_git")) + '/external/smhasher.git@e87738e57558e0ec472b2fc3a643b838e5b6e88f', + 'src/third_party/snappy/src': + (Var("chromium_git")) + '/external/snappy.git@762bb32f0c9d2f31ba4958c7c0933d22e80c20bf', + 'src/third_party/trace-viewer': + (Var("chromium_git")) + '/external/trace-viewer.git@e2b5374c4941c450b168d4c7d9110fb91b2d4c19', + 'src/third_party/usrsctp/usrsctplib': + (Var("chromium_git")) + '/external/usrsctplib.git@36444a999739e9e408f8f587cb4c3ffeef2e50ac', + 'src/third_party/webdriver/pylib': + (Var("chromium_git")) + '/external/selenium/py.git@5fd78261a75fe08d27ca4835fb6c5ce4b42275bd', + 'src/third_party/webgl/src': + (Var("chromium_git")) + '/external/khronosgroup/webgl.git@1e318b3f0ad952d22477151eec98d37fa08e5bc7', + 'src/third_party/webpagereplay': + (Var("chromium_git")) + '/external/github.com/chromium/web-page-replay.git@e53550b73e8e098938a651bc8ceb3681e5980567', + 'src/third_party/webrtc': + (Var("chromium_git")) + '/external/webrtc/trunk/webrtc.git@e725d9de25a3809bce4626831f385830e91695ff', + 'src/third_party/yasm/source/patched-yasm': + (Var("chromium_git")) + '/chromium/deps/yasm/patched-yasm.git@4671120cd8558ce62ee8672ebf3eb6f5216f909b', + 'src/tools/deps2git': + (Var("chromium_git")) + '/chromium/tools/deps2git.git@f04828eb0b5acd3e7ad983c024870f17f17b06d9', + 'src/tools/grit': + (Var("chromium_git")) + '/external/grit-i18n.git@c1b1591a05209c1ad467e845ba8543c22f9072af', + 'src/tools/gyp': + (Var("chromium_git")) + '/external/gyp.git@0bb67471bca068996e15b56738fa4824dfa19de0', + 'src/tools/page_cycler/acid3': + (Var("chromium_git")) + '/chromium/deps/acid3.git@6be0a66a1ebd7ebc5abc1b2f405a945f6d871521', + 'src/tools/swarming_client': + (Var("chromium_git")) + '/external/swarming.client.git@b39a448d8522392389b28f6997126a6ab04bfe87', + 'src/v8': + (Var("chromium_git")) + '/v8/v8.git@f2469f248ac14c8fc9b6b2870b75bfbc15ea011f' } - deps_os = { - 'win': { - 'src/chrome/tools/test/reference_build/chrome_win': - Var('chromium_git') + '/chromium/reference_builds/chrome_win.git' + '@' + 'f8a3a845dfc845df6b14280f04f86a61959357ef', - - 'src/third_party/cygwin': - Var('chromium_git') + '/chromium/deps/cygwin.git' + '@' + 'c89e446b273697fadf3a10ff1007a97c0b7de6df', - - 'src/third_party/psyco_win32': - Var('chromium_git') + '/chromium/deps/psyco_win32.git' + '@' + 'f5af9f6910ee5a8075bbaeed0591469f1661d868', - - 'src/third_party/bison': - Var('chromium_git') + '/chromium/deps/bison.git' + '@' + '083c9a45e4affdd5464ee2b224c2df649c6e26c3', - - 'src/third_party/gperf': - Var('chromium_git') + '/chromium/deps/gperf.git' + '@' + 'd892d79f64f9449770443fb06da49b5a1e5d33c1', - - 'src/third_party/perl': - Var('chromium_git') + '/chromium/deps/perl.git' + '@' + 'ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78', - - 'src/third_party/lighttpd': - Var('chromium_git') + '/chromium/deps/lighttpd.git' + '@' + Var('lighttpd_revision'), - - # Parses Windows PE/COFF executable format. - 'src/third_party/pefile': - Var('chromium_git') + '/external/pefile.git' + '@' + '72c6ae42396cb913bcab63c15585dc3b5c3f92f1', - - # NSS, for SSLClientSocketNSS. - 'src/third_party/nss': - Var('chromium_git') + '/chromium/deps/nss.git' + '@' + Var('nss_revision'), - - # GNU binutils assembler for x86-32. - 'src/third_party/gnu_binutils': - Var('chromium_git') + '/native_client/deps/third_party/gnu_binutils.git' + '@' + 'f4003433b61b25666565690caf3d7a7a1a4ec436', - # GNU binutils assembler for x86-64. - 'src/third_party/mingw-w64/mingw/bin': - Var('chromium_git') + '/native_client/deps/third_party/mingw-w64/mingw/bin.git' + '@' + '3cc8b140b883a9fe4986d12cfd46c16a093d3527', - - # Dependencies used by libjpeg-turbo - 'src/third_party/yasm/binaries': - Var('chromium_git') + '/chromium/deps/yasm/binaries.git' + '@' + '52f9b3f4b0aa06da24ef8b123058bb61ee468881', - - # Binaries for nacl sdk. - 'src/third_party/nacl_sdk_binaries': - Var('chromium_git') + '/chromium/deps/nacl_sdk_binaries.git' + '@' + '759dfca03bdc774da7ecbf974f6e2b84f43699a5', - - # Omaha code for src/app_installer/. - 'src/third_party/omaha/src/omaha': - Var('chromium_git') + '/external/omaha.git' + '@' + '098c7a3d157218dab4eed595e8f2fbe5a20a0bae', + 'android': { + 'src/third_party/android_protobuf/src': + (Var("chromium_git")) + '/external/android_protobuf.git@94f522f907e3f34f70d9e7816b947e62fddbb267', + 'src/third_party/android_tools': + (Var("chromium_git")) + '/android_tools.git@e0ab396314ac4f2fdbb5538597914a0fd3cb447d', + 'src/third_party/apache-mime4j': + (Var("chromium_git")) + '/chromium/deps/apache-mime4j.git@28cb1108bff4b6cf0a2e86ff58b3d025934ebe3a', + 'src/third_party/appurify-python/src': + (Var("chromium_git")) + '/external/github.com/appurify/appurify-python.git@ee7abd5c5ae3106f72b2a0b9d2cb55094688e867', + 'src/third_party/elfutils/src': + (Var("chromium_git")) + '/external/elfutils.git@249673729a7e5dbd5de4f3760bdcaa3d23d154d7', + 'src/third_party/findbugs': + (Var("chromium_git")) + '/chromium/deps/findbugs.git@7f69fa78a6db6dc31866d09572a0e356e921bf12', + 'src/third_party/freetype': + (Var("chromium_git")) + '/chromium/src/third_party/freetype.git@3165210e3e3f5d93f27b6872fbb122cbfc7b33ce', + 'src/third_party/httpcomponents-client': + (Var("chromium_git")) + '/chromium/deps/httpcomponents-client.git@285c4dafc5de0e853fa845dce5773e223219601c', + 'src/third_party/httpcomponents-core': + (Var("chromium_git")) + '/chromium/deps/httpcomponents-core.git@9f7180a96f8fa5cab23f793c14b413356d419e62', + 'src/third_party/jarjar': + (Var("chromium_git")) + '/chromium/deps/jarjar.git@2e1ead4c68c450e0b77fe49e3f9137842b8b6920', + 'src/third_party/jsr-305/src': + (Var("chromium_git")) + '/external/jsr-305.git@642c508235471f7220af6d5df2d3210e3bfc0919', + 'src/third_party/junit/src': + (Var("chromium_git")) + '/external/junit.git@45a44647e7306262162e1346b750c3209019f2e1', + 'src/third_party/lss': + (Var("chromium_git")) + '/external/linux-syscall-support/lss.git@6f97298fe3794e92c8c896a6bc06e0b36e4c3de3', + 'src/third_party/mockito/src': + (Var("chromium_git")) + '/external/mockito/mockito.git@ed99a52e94a84bd7c467f2443b475a22fcc6ba8e', + 'src/third_party/requests/src': + (Var("chromium_git")) + '/external/github.com/kennethreitz/requests.git@f172b30356d821d180fa4ecfa3e71c7274a32de4', + 'src/third_party/robolectric/lib': + (Var("chromium_git")) + '/chromium/third_party/robolectric.git@6b63c99a8b6967acdb42cbed0adb067c80efc810' }, 'ios': { - 'src/ios/third_party/gcdwebserver/src': - Var('chromium_git') + '/external/github.com/swisspol/GCDWebServer.git' + '@' + '18889793b75d7ee593d62ac88997caad850acdb6', - - 'src/third_party/google_toolbox_for_mac/src': - Var('chromium_git') + '/external/google-toolbox-for-mac.git' + '@' + Var('google_toolbox_for_mac_revision'), - - 'src/third_party/nss': - Var('chromium_git') + '/chromium/deps/nss.git' + '@' + Var('nss_revision'), - - # class-dump utility to generate header files for undocumented SDKs - 'src/testing/iossim/third_party/class-dump': - Var('chromium_git') + '/chromium/deps/class-dump.git' + '@' + '89bd40883c767584240b4dade8b74e6f57b9bdab', - - # Code that's not needed due to not building everything 'src/chrome/test/data/perf/canvas_bench': None, 'src/chrome/test/data/perf/frame_rate/content': None, + 'src/ios/third_party/gcdwebserver/src': + (Var("chromium_git")) + '/external/github.com/swisspol/GCDWebServer.git@18889793b75d7ee593d62ac88997caad850acdb6', 'src/native_client': None, + 'src/testing/iossim/third_party/class-dump': + (Var("chromium_git")) + '/chromium/deps/class-dump.git@89bd40883c767584240b4dade8b74e6f57b9bdab', 'src/third_party/ffmpeg': None, + 'src/third_party/google_toolbox_for_mac/src': + (Var("chromium_git")) + '/external/google-toolbox-for-mac.git@ce47a231ea0b238fbe95538e86cc61d74c234be6', 'src/third_party/hunspell_dictionaries': None, - 'src/third_party/webgl': None, + 'src/third_party/nss': + (Var("chromium_git")) + '/chromium/deps/nss.git@aab0d08a298b29407397fbb1c4219f99e99431ed', + 'src/third_party/webgl': None }, 'mac': { + 'src/chrome/installer/mac/third_party/xz/xz': + (Var("chromium_git")) + '/chromium/deps/xz.git@eecaf55632ca72e90eb2641376bce7cdbc7284f7', 'src/chrome/tools/test/reference_build/chrome_mac': - Var('chromium_git') + '/chromium/reference_builds/chrome_mac.git' + '@' + '8dc181329e7c5255f83b4b85dc2f71498a237955', - + (Var("chromium_git")) + '/chromium/reference_builds/chrome_mac.git@8dc181329e7c5255f83b4b85dc2f71498a237955', 'src/third_party/google_toolbox_for_mac/src': - Var('chromium_git') + '/external/google-toolbox-for-mac.git' + '@' + Var('google_toolbox_for_mac_revision'), - - - 'src/third_party/pdfsqueeze': - Var('chromium_git') + '/external/pdfsqueeze.git' + '@' + '5936b871e6a087b7e50d4cbcb122378d8a07499f', - + (Var("chromium_git")) + '/external/google-toolbox-for-mac.git@ce47a231ea0b238fbe95538e86cc61d74c234be6', 'src/third_party/lighttpd': - Var('chromium_git') + '/chromium/deps/lighttpd.git' + '@' + Var('lighttpd_revision'), - - # NSS, for SSLClientSocketNSS. + (Var("chromium_git")) + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', 'src/third_party/nss': - Var('chromium_git') + '/chromium/deps/nss.git' + '@' + Var('nss_revision'), - - 'src/chrome/installer/mac/third_party/xz/xz': - Var('chromium_git') + '/chromium/deps/xz.git' + '@' + 'eecaf55632ca72e90eb2641376bce7cdbc7284f7', + (Var("chromium_git")) + '/chromium/deps/nss.git@aab0d08a298b29407397fbb1c4219f99e99431ed', + 'src/third_party/pdfsqueeze': + (Var("chromium_git")) + '/external/pdfsqueeze.git@5936b871e6a087b7e50d4cbcb122378d8a07499f' }, 'unix': { - # Linux, really. 'src/chrome/tools/test/reference_build/chrome_linux': - Var('chromium_git') + '/chromium/reference_builds/chrome_linux64.git' + '@' + '033d053a528e820e1de3e2db766678d862a86b36', - - 'src/third_party/xdg-utils': - Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d', - - 'src/third_party/lss': - Var('chromium_git') + '/external/linux-syscall-support/lss.git' + '@' + Var('lss_revision'), - - # For Linux and Chromium OS. + (Var("chromium_git")) + '/chromium/reference_builds/chrome_linux64.git@033d053a528e820e1de3e2db766678d862a86b36', + 'src/third_party/chromite': + (Var("chromiumos_git")) + '/chromite.git@c9bfb471ec08e85d0c8baa35341403013153956c', 'src/third_party/cros_system_api': - Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + 'f2d7a9a97171f25419ff4294b1dba41302981fa2', - - # Note that this is different from Android's freetype repo. + (Var("chromiumos_git")) + '/platform/system_api.git@f2d7a9a97171f25419ff4294b1dba41302981fa2', + 'src/third_party/fontconfig/src': + (Var("chromium_git")) + '/external/fontconfig.git@f16c3118e25546c1b749f9823c51827a60aeb5c1', 'src/third_party/freetype2/src': - Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + '1dd5f5f4a909866f15c92a45c9702bce290a0151', - - # Build tools for Chrome OS. - 'src/third_party/chromite': - Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'c9bfb471ec08e85d0c8baa35341403013153956c', - - # Dependency of chromite.git. - 'src/third_party/pyelftools': - Var('chromium_git') + '/chromiumos/third_party/pyelftools.git' + '@' + 'bdc1d380acd88d4bfaf47265008091483b0d614e', - - 'src/third_party/undoview': - Var('chromium_git') + '/chromium/deps/undoview.git' + '@' + '3ba503e248f3cdbd81b78325a24ece0984637559', - + (Var("chromium_git")) + '/chromium/src/third_party/freetype2.git@1dd5f5f4a909866f15c92a45c9702bce290a0151', 'src/third_party/liblouis/src': - Var('chromium_git') + '/external/liblouis-github.git' + '@' + '5f9c03f2a3478561deb6ae4798175094be8a26c2', - - # Used for embedded builds. CrOS & Linux use the system version. - 'src/third_party/fontconfig/src': - Var('chromium_git') + '/external/fontconfig.git' + '@' + 'f16c3118e25546c1b749f9823c51827a60aeb5c1', - - 'src/third_party/stp/src': - Var('chromium_git') + '/external/github.com/stp/stp.git' + '@' + 'fc94a599207752ab4d64048204f0c88494811b62', - }, - 'android': { - 'src/third_party/android_protobuf/src': - Var('chromium_git') + '/external/android_protobuf.git' + '@' + '94f522f907e3f34f70d9e7816b947e62fddbb267', - - 'src/third_party/android_tools': - Var('chromium_git') + '/android_tools.git' + '@' + '3445d55bd6a9bedd04ecd9deabc9071fa5b93ca1', - - 'src/third_party/apache-mime4j': - Var('chromium_git') + '/chromium/deps/apache-mime4j.git' + '@' + '28cb1108bff4b6cf0a2e86ff58b3d025934ebe3a', - - 'src/third_party/appurify-python/src': - Var('chromium_git') + '/external/github.com/appurify/appurify-python.git' + '@' + 'ee7abd5c5ae3106f72b2a0b9d2cb55094688e867', - - 'src/third_party/findbugs': - Var('chromium_git') + '/chromium/deps/findbugs.git' + '@' + '7f69fa78a6db6dc31866d09572a0e356e921bf12', - - 'src/third_party/freetype': - Var('chromium_git') + '/chromium/src/third_party/freetype.git' + '@' + '3165210e3e3f5d93f27b6872fbb122cbfc7b33ce', - - 'src/third_party/elfutils/src': - Var('chromium_git') + '/external/elfutils.git' + '@' + '249673729a7e5dbd5de4f3760bdcaa3d23d154d7', - - 'src/third_party/httpcomponents-client': - Var('chromium_git') + '/chromium/deps/httpcomponents-client.git' + '@' + '285c4dafc5de0e853fa845dce5773e223219601c', - - 'src/third_party/httpcomponents-core': - Var('chromium_git') + '/chromium/deps/httpcomponents-core.git' + '@' + '9f7180a96f8fa5cab23f793c14b413356d419e62', - - 'src/third_party/jarjar': - Var('chromium_git') + '/chromium/deps/jarjar.git' + '@' + '2e1ead4c68c450e0b77fe49e3f9137842b8b6920', - - 'src/third_party/jsr-305/src': - Var('chromium_git') + '/external/jsr-305.git' + '@' + '642c508235471f7220af6d5df2d3210e3bfc0919', - - 'src/third_party/junit/src': - Var('chromium_git') + '/external/junit.git' + '@' + '45a44647e7306262162e1346b750c3209019f2e1', - - 'src/third_party/mockito/src': - Var('chromium_git') + '/external/mockito/mockito.git' + '@' + 'ed99a52e94a84bd7c467f2443b475a22fcc6ba8e', - - 'src/third_party/robolectric/lib': - Var('chromium_git') + '/chromium/third_party/robolectric.git' + '@' + '6b63c99a8b6967acdb42cbed0adb067c80efc810', - + (Var("chromium_git")) + '/external/liblouis-github.git@5f9c03f2a3478561deb6ae4798175094be8a26c2', 'src/third_party/lss': - Var('chromium_git') + '/external/linux-syscall-support/lss.git' + '@' + Var('lss_revision'), - - 'src/third_party/requests/src': - Var('chromium_git') + '/external/github.com/kennethreitz/requests.git' + '@' + 'f172b30356d821d180fa4ecfa3e71c7274a32de4', - + (Var("chromium_git")) + '/external/linux-syscall-support/lss.git@6f97298fe3794e92c8c896a6bc06e0b36e4c3de3', + 'src/third_party/pyelftools': + (Var("chromiumos_git")) + '/third_party/pyelftools.git@bdc1d380acd88d4bfaf47265008091483b0d614e', + 'src/third_party/stp/src': + (Var("chromium_git")) + '/external/github.com/stp/stp.git@fc94a599207752ab4d64048204f0c88494811b62', + 'src/third_party/undoview': + (Var("chromium_git")) + '/chromium/deps/undoview.git@3ba503e248f3cdbd81b78325a24ece0984637559', + 'src/third_party/xdg-utils': + (Var("chromium_git")) + '/chromium/deps/xdg-utils.git@d80274d5869b17b8c9067a1022e4416ee7ed5e0d' }, + 'win': { + 'src/chrome/tools/test/reference_build/chrome_win': + (Var("chromium_git")) + '/chromium/reference_builds/chrome_win.git@f8a3a845dfc845df6b14280f04f86a61959357ef', + 'src/third_party/bison': + (Var("chromium_git")) + '/chromium/deps/bison.git@083c9a45e4affdd5464ee2b224c2df649c6e26c3', + 'src/third_party/cygwin': + (Var("chromium_git")) + '/chromium/deps/cygwin.git@c89e446b273697fadf3a10ff1007a97c0b7de6df', + 'src/third_party/gnu_binutils': + (Var("chromium_git")) + '/native_client/deps/third_party/gnu_binutils.git@f4003433b61b25666565690caf3d7a7a1a4ec436', + 'src/third_party/gperf': + (Var("chromium_git")) + '/chromium/deps/gperf.git@d892d79f64f9449770443fb06da49b5a1e5d33c1', + 'src/third_party/lighttpd': + (Var("chromium_git")) + '/chromium/deps/lighttpd.git@9dfa55d15937a688a92cbf2b7a8621b0927d06eb', + 'src/third_party/mingw-w64/mingw/bin': + (Var("chromium_git")) + '/native_client/deps/third_party/mingw-w64/mingw/bin.git@3cc8b140b883a9fe4986d12cfd46c16a093d3527', + 'src/third_party/nacl_sdk_binaries': + (Var("chromium_git")) + '/chromium/deps/nacl_sdk_binaries.git@759dfca03bdc774da7ecbf974f6e2b84f43699a5', + 'src/third_party/nss': + (Var("chromium_git")) + '/chromium/deps/nss.git@aab0d08a298b29407397fbb1c4219f99e99431ed', + 'src/third_party/omaha/src/omaha': + (Var("chromium_git")) + '/external/omaha.git@098c7a3d157218dab4eed595e8f2fbe5a20a0bae', + 'src/third_party/pefile': + (Var("chromium_git")) + '/external/pefile.git@72c6ae42396cb913bcab63c15585dc3b5c3f92f1', + 'src/third_party/perl': + (Var("chromium_git")) + '/chromium/deps/perl.git@ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78', + 'src/third_party/psyco_win32': + (Var("chromium_git")) + '/chromium/deps/psyco_win32.git@f5af9f6910ee5a8075bbaeed0591469f1661d868', + 'src/third_party/yasm/binaries': + (Var("chromium_git")) + '/chromium/deps/yasm/binaries.git@52f9b3f4b0aa06da24ef8b123058bb61ee468881' + } } - -include_rules = [ - # Everybody can use some things. - # NOTE: THIS HAS TO STAY IN SYNC WITH third_party/DEPS which disallows these. - '+base', - '+build', - '+ipc', - - # Everybody can use headers generated by tools/generate_library_loader. - '+library_loaders', - - '+testing', - '+third_party/icu/source/common/unicode', - '+third_party/icu/source/i18n/unicode', - '+url', -] - - -# checkdeps.py shouldn't check include paths for files in these dirs: -skip_child_includes = [ - 'breakpad', - 'native_client_sdk', - 'out', - 'sdch', - 'skia', - 'testing', - 'v8', - 'win8', -] - - hooks = [ + # Custom Crosswalk hook. { - # This clobbers when necessary (based on get_landmines.py). It must be the - # first hook so that other things that get/generate into the output - # directory will not subsequently be clobbered. - 'name': 'landmines', - 'pattern': '.', 'action': [ - 'python', - 'src/build/landmines.py', + 'python', + 'src/build/empty_google_play_services_lib.py' ], + 'pattern': + '.', + 'name': + 'empty_google_play_services_lib' }, + { - # This downloads binaries for Native Client's newlib toolchain. - # Done in lieu of building the toolchain from scratch as it can take - # anywhere from 30 minutes to 4 hours depending on platform to build. - 'name': 'nacltools', - 'pattern': '.', 'action': [ - 'python', - 'src/build/download_nacl_toolchains.py', - '--mode', 'nacl_core_sdk', - 'sync', '--extract', + 'python', + 'src/build/landmines.py' ], + 'pattern': + '.', + 'name': + 'landmines' }, { - # This downloads SDK extras and puts them in the - # third_party/android_tools/sdk/extras directory on the bots. Developers - # need to manually install these packages and accept the ToS. - 'name': 'sdkextras', - 'pattern': '.', - # When adding a new sdk extras package to download, add the package - # directory and zip file to .gitignore in third_party/android_tools. - 'action': ['python', 'src/build/download_sdk_extras.py'], + 'action': [ + 'python', + 'src/build/download_nacl_toolchains.py', + '--mode', + 'nacl_core_sdk', + 'sync', + '--extract' + ], + 'pattern': + '.', + 'name': + 'nacltools' }, { - # Downloads the Debian Wheezy sysroot to chrome/installer/linux if needed. - # This sysroot updates at about the same rate that the chrome build deps - # change. This script is a no-op except for linux users who are doing - # official chrome builds. - 'name': 'sysroot', - 'pattern': '.', 'action': [ - 'python', - 'src/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py', - '--running-as-hook'], + 'python', + 'src/build/download_sdk_extras.py' + ], + 'pattern': + '.', + 'name': + 'sdkextras' }, { - # Update the Windows toolchain if necessary. - 'name': 'win_toolchain', - 'pattern': '.', - 'action': ['python', 'src/build/vs_toolchain.py', 'update'], + 'action': [ + 'python', + 'src/chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py', + '--running-as-hook' + ], + 'pattern': + '.', + 'name': + 'sysroot' }, { - # Pull clang if needed or requested via GYP_DEFINES. - # Note: On Win, this should run after win_toolchain, as it may use it. - 'name': 'clang', - 'pattern': '.', - 'action': ['python', 'src/tools/clang/scripts/update.py', '--if-needed'], + 'action': [ + 'python', + 'src/build/vs_toolchain.py', + 'update' + ], + 'pattern': + '.', + 'name': + 'win_toolchain' }, { - # Update LASTCHANGE. - 'name': 'lastchange', - 'pattern': '.', - 'action': ['python', 'src/build/util/lastchange.py', - '-o', 'src/build/util/LASTCHANGE'], + 'action': [ + 'python', + 'src/tools/clang/scripts/update.py', + '--if-needed' + ], + 'pattern': + '.', + 'name': + 'clang' }, { - # Update LASTCHANGE.blink. - 'name': 'lastchange', - 'pattern': '.', - 'action': ['python', 'src/build/util/lastchange.py', - '-s', 'src/third_party/WebKit', - '-o', 'src/build/util/LASTCHANGE.blink'], + 'action': [ + 'python', + 'src/build/util/lastchange.py', + '-o', + 'src/build/util/LASTCHANGE' + ], + 'pattern': + '.', + 'name': + 'lastchange' }, - # Pull GN binaries. This needs to be before running GYP below. { - 'name': 'gn_win', - 'pattern': '.', - 'action': [ 'download_from_google_storage', - '--no_resume', - '--platform=win32', - '--no_auth', - '--bucket', 'chromium-gn', - '-s', 'src/buildtools/win/gn.exe.sha1', + 'action': [ + 'python', + 'src/build/util/lastchange.py', + '-s', + 'src/third_party/WebKit', + '-o', + 'src/build/util/LASTCHANGE.blink' ], + 'pattern': + '.', + 'name': + 'lastchange' }, { - 'name': 'gn_mac', - 'pattern': '.', - 'action': [ 'download_from_google_storage', - '--no_resume', - '--platform=darwin', - '--no_auth', - '--bucket', 'chromium-gn', - '-s', 'src/buildtools/mac/gn.sha1', + 'action': [ + 'download_from_google_storage', + '--no_resume', + '--platform=win32', + '--no_auth', + '--bucket', + 'chromium-gn', + '-s', + 'src/buildtools/win/gn.exe.sha1' ], + 'pattern': + '.', + 'name': + 'gn_win' }, { - 'name': 'gn_linux64', - 'pattern': '.', - 'action': [ 'download_from_google_storage', - '--no_resume', - '--platform=linux*', - '--no_auth', - '--bucket', 'chromium-gn', - '-s', 'src/buildtools/linux64/gn.sha1', + 'action': [ + 'download_from_google_storage', + '--no_resume', + '--platform=darwin', + '--no_auth', + '--bucket', + 'chromium-gn', + '-s', + 'src/buildtools/mac/gn.sha1' ], + 'pattern': + '.', + 'name': + 'gn_mac' }, - # Pull clang-format binaries using checked-in hashes. { - 'name': 'clang_format_win', - 'pattern': '.', - 'action': [ 'download_from_google_storage', - '--no_resume', - '--platform=win32', - '--no_auth', - '--bucket', 'chromium-clang-format', - '-s', 'src/buildtools/win/clang-format.exe.sha1', + 'action': [ + 'download_from_google_storage', + '--no_resume', + '--platform=linux*', + '--no_auth', + '--bucket', + 'chromium-gn', + '-s', + 'src/buildtools/linux64/gn.sha1' ], + 'pattern': + '.', + 'name': + 'gn_linux64' }, { - 'name': 'clang_format_mac', - 'pattern': '.', - 'action': [ 'download_from_google_storage', - '--no_resume', - '--platform=darwin', - '--no_auth', - '--bucket', 'chromium-clang-format', - '-s', 'src/buildtools/mac/clang-format.sha1', + 'action': [ + 'download_from_google_storage', + '--no_resume', + '--platform=win32', + '--no_auth', + '--bucket', + 'chromium-clang-format', + '-s', + 'src/buildtools/win/clang-format.exe.sha1' ], + 'pattern': + '.', + 'name': + 'clang_format_win' }, { - 'name': 'clang_format_linux', - 'pattern': '.', - 'action': [ 'download_from_google_storage', - '--no_resume', - '--platform=linux*', - '--no_auth', - '--bucket', 'chromium-clang-format', - '-s', 'src/buildtools/linux64/clang-format.sha1', + 'action': [ + 'download_from_google_storage', + '--no_resume', + '--platform=darwin', + '--no_auth', + '--bucket', + 'chromium-clang-format', + '-s', + 'src/buildtools/mac/clang-format.sha1' ], + 'pattern': + '.', + 'name': + 'clang_format_mac' }, - # Pull binutils for linux, enabled debug fission for faster linking / - # debugging when used with clang on Ubuntu Precise. - # https://code.google.com/p/chromium/issues/detail?id=352046 { - 'name': 'binutils', - 'pattern': 'src/third_party/binutils', 'action': [ - 'python', - 'src/third_party/binutils/download.py', + 'download_from_google_storage', + '--no_resume', + '--platform=linux*', + '--no_auth', + '--bucket', + 'chromium-clang-format', + '-s', + 'src/buildtools/linux64/clang-format.sha1' ], + 'pattern': + '.', + 'name': + 'clang_format_linux' }, - # Pull eu-strip binaries using checked-in hashes. { - 'name': 'eu-strip', - 'pattern': '.', - 'action': [ 'download_from_google_storage', - '--no_resume', - '--platform=linux*', - '--no_auth', - '--bucket', 'chromium-eu-strip', - '-s', 'src/build/linux/bin/eu-strip.sha1', + 'action': [ + 'python', + 'src/third_party/binutils/download.py' ], + 'pattern': + 'src/third_party/binutils', + 'name': + 'binutils' }, { - 'name': 'drmemory', - 'pattern': '.', - 'action': [ 'download_from_google_storage', - '--no_resume', - '--platform=win32', - '--no_auth', - '--bucket', 'chromium-drmemory', - '-s', 'src/third_party/drmemory/drmemory-windows-sfx.exe.sha1', - ], + 'action': [ + 'download_from_google_storage', + '--no_resume', + '--platform=linux*', + '--no_auth', + '--bucket', + 'chromium-eu-strip', + '-s', + 'src/build/linux/bin/eu-strip.sha1' + ], + 'pattern': + '.', + 'name': + 'eu-strip' }, - # Pull the Syzygy binaries, used for optimization and instrumentation. { - 'name': 'syzygy-binaries', - 'pattern': '.', - 'action': ['python', - 'src/build/get_syzygy_binaries.py', - '--output-dir=src/third_party/syzygy/binaries', - '--revision=24bc1affd8aecfdcbe87c0802372ae766bf2507b', - '--overwrite', + 'action': [ + 'download_from_google_storage', + '--no_resume', + '--platform=win32', + '--no_auth', + '--bucket', + 'chromium-drmemory', + '-s', + 'src/third_party/drmemory/drmemory-windows-sfx.exe.sha1' ], + 'pattern': + '.', + 'name': + 'drmemory' }, { - 'name': 'kasko', - 'pattern': '.', - 'action': ['python', - 'src/build/get_syzygy_binaries.py', - '--output-dir=src/third_party/kasko', - '--revision=b8adaf37ad3beae939ee2db5ae9c0f8b380d2060', - '--resource=kasko.zip', - '--resource=kasko_symbols.zip', - '--overwrite', + 'action': [ + 'python', + 'src/build/get_syzygy_binaries.py', + '--output-dir=src/third_party/syzygy/binaries', + '--revision=24bc1affd8aecfdcbe87c0802372ae766bf2507b', + '--overwrite' ], + 'pattern': + '.', + 'name': + 'syzygy-binaries' }, { - 'name': 'apache_win32', - 'pattern': '\\.sha1', - 'action': [ 'download_from_google_storage', - '--no_resume', - '--platform=win32', - '--directory', - '--recursive', - '--no_auth', - '--num_threads=16', - '--bucket', 'chromium-apache-win32', - 'src/third_party/apache-win32', + 'action': [ + 'python', + 'src/build/get_syzygy_binaries.py', + '--output-dir=src/third_party/kasko', + '--revision=b8adaf37ad3beae939ee2db5ae9c0f8b380d2060', + '--resource=kasko.zip', + '--resource=kasko_symbols.zip', + '--overwrite' ], + 'pattern': + '.', + 'name': + 'kasko' }, - # Pull the mojo_shell binary, used for mojo development { - 'name': 'download_mojo_shell', - 'pattern': '', - 'action': [ 'python', - 'src/third_party/mojo/src/mojo/public/tools/download_shell_binary.py', - '--tools-directory=../../../../../../tools', - ], + 'action': [ + 'download_from_google_storage', + '--no_resume', + '--platform=win32', + '--directory', + '--recursive', + '--no_auth', + '--num_threads=16', + '--bucket', + 'chromium-apache-win32', + 'src/third_party/apache-win32' + ], + 'pattern': + '\\.sha1', + 'name': + 'apache_win32' }, { - # Pull sanitizer-instrumented third-party libraries if requested via - # GYP_DEFINES. - 'name': 'instrumented_libraries', - 'pattern': '\\.sha1', - 'action': ['python', 'src/third_party/instrumented_libraries/scripts/download_binaries.py'], + 'action': [ + 'python', + 'src/third_party/mojo/src/mojo/public/tools/download_shell_binary.py', + '--tools-directory=../../../../../../tools' + ], + 'pattern': + '', + 'name': + 'download_mojo_shell' }, { - # A change to a .gyp, .gypi, or to GYP itself should run the generator. - 'name': 'gyp', - 'pattern': '.', - 'action': ['python', 'src/build/gyp_chromium'], + 'action': [ + 'python', + 'src/third_party/instrumented_libraries/scripts/download_binaries.py' + ], + 'pattern': + '\\.sha1', + 'name': + 'instrumented_libraries' }, { - # Verify committers' ~/.netc, gclient and git are properly configured for - # write access to the git repo. To be removed sometime after Chrome to git - # migration completes (let's say Sep 1 2014). - 'name': 'check_git_config', - 'pattern': '.', 'action': [ - 'python', - 'src/tools/check_git_config.py', - '--running-as-hook', + 'python', + 'src/build/gyp_chromium' ], + 'pattern': + '.', + 'name': + 'gyp' }, { - # Ensure that we don't accidentally reference any .pyc files whose - # corresponding .py files have already been deleted. - 'name': 'remove_stale_pyc_files', - 'pattern': 'src/tools/.*\\.py', 'action': [ - 'python', - 'src/tools/remove_stale_pyc_files.py', - 'src/tools', + 'python', + 'src/tools/check_git_config.py', + '--running-as-hook' ], + 'pattern': + '.', + 'name': + 'check_git_config' }, + { + 'action': [ + 'python', + 'src/tools/remove_stale_pyc_files.py', + 'src/tools' + ], + 'pattern': + 'src/tools/.*\\.py', + 'name': + 'remove_stale_pyc_files' + } +] + +include_rules = [ + '+base', + '+build', + '+ipc', + '+library_loaders', + '+testing', + '+third_party/icu/source/common/unicode', + '+third_party/icu/source/i18n/unicode', + '+url' +] + +skip_child_includes = [ + 'breakpad', + 'native_client_sdk', + 'out', + 'sdch', + 'skia', + 'testing', + 'v8', + 'win8' ] diff --git a/android_webview/apk/java/proguard.flags b/android_webview/apk/java/proguard.flags index b19519fd2c71e..9820750be4f0f 100644 --- a/android_webview/apk/java/proguard.flags +++ b/android_webview/apk/java/proguard.flags @@ -99,3 +99,7 @@ -keep class com.android.org.chromium.ui.ColorPickerMoreButton { (...); } + +# Remove when ViewStructure is no longer duplicated (crbug.com/513229) +-dontwarn android.view.* +-dontwarn android.webkit.* diff --git a/android_webview/browser/aw_permission_manager.cc b/android_webview/browser/aw_permission_manager.cc index eb517b4108326..4bc055ef6f724 100644 --- a/android_webview/browser/aw_permission_manager.cc +++ b/android_webview/browser/aw_permission_manager.cc @@ -4,28 +4,163 @@ #include "android_webview/browser/aw_permission_manager.h" +#include + #include "android_webview/browser/aw_browser_permission_request_delegate.h" #include "base/callback.h" +#include "base/containers/hash_tables.h" +#include "base/logging.h" +#include "base/memory/weak_ptr.h" #include "content/public/browser/permission_type.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/web_contents.h" +using content::PermissionStatus; +using content::PermissionType; + namespace android_webview { +class LastRequestResultCache { + public: + LastRequestResultCache() : weak_factory_(this) {} + + void SetResult(PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin, + PermissionStatus status) { + DCHECK(status == content::PERMISSION_STATUS_GRANTED || + status == content::PERMISSION_STATUS_DENIED); + + // TODO(ddorwin): We should be denying empty origins at a higher level. + if (requesting_origin.is_empty() || embedding_origin.is_empty()) { + DLOG(WARNING) << "Not caching result because of empty origin."; + return; + } + + if (!requesting_origin.is_valid()) { + NOTREACHED() << requesting_origin.possibly_invalid_spec(); + return; + } + if (!embedding_origin.is_valid()) { + NOTREACHED() << embedding_origin.possibly_invalid_spec(); + return; + } + + if (permission != PermissionType::PROTECTED_MEDIA_IDENTIFIER) { + // Other permissions are not cached. + return; + } + + std::string key = GetCacheKey(requesting_origin, embedding_origin); + if (key.empty()) { + NOTREACHED(); + // Never store an empty key because it could inadvertently be used for + // another combination. + return; + } + pmi_result_cache_[key] = status; + } + + PermissionStatus GetResult(PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) const { + // TODO(ddorwin): We should be denying empty origins at a higher level. + if (requesting_origin.is_empty() || embedding_origin.is_empty()) { + return content::PERMISSION_STATUS_ASK; + } + + DCHECK(requesting_origin.is_valid()) + << requesting_origin.possibly_invalid_spec(); + DCHECK(embedding_origin.is_valid()) + << embedding_origin.possibly_invalid_spec(); + + if (permission != PermissionType::PROTECTED_MEDIA_IDENTIFIER) { + NOTREACHED() << "Results are only cached for PROTECTED_MEDIA_IDENTIFIER"; + return content::PERMISSION_STATUS_ASK; + } + + std::string key = GetCacheKey(requesting_origin, embedding_origin); + StatusMap::const_iterator it = pmi_result_cache_.find(key); + if (it == pmi_result_cache_.end()) { + DLOG(WARNING) << "GetResult() called for uncached origins: " << key; + return content::PERMISSION_STATUS_ASK; + } + + DCHECK(!key.empty()); + return it->second; + } + + void ClearResult(PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin) { + // TODO(ddorwin): We should be denying empty origins at a higher level. + if (requesting_origin.is_empty() || embedding_origin.is_empty()) { + return; + } + + DCHECK(requesting_origin.is_valid()) + << requesting_origin.possibly_invalid_spec(); + DCHECK(embedding_origin.is_valid()) + << embedding_origin.possibly_invalid_spec(); + + + if (permission != PermissionType::PROTECTED_MEDIA_IDENTIFIER) { + // Other permissions are not cached, so nothing to clear. + return; + } + + std::string key = GetCacheKey(requesting_origin, embedding_origin); + pmi_result_cache_.erase(key); + } + + base::WeakPtr GetWeakPtr() { + return weak_factory_.GetWeakPtr(); + } + + private: + // Returns a concatenation of the origins to be used as the index. + // Returns the empty string if either origin is invalid or empty. + static std::string GetCacheKey(const GURL& requesting_origin, + const GURL& embedding_origin) { + const std::string& requesting = requesting_origin.spec(); + const std::string& embedding = embedding_origin.spec(); + if (requesting.empty() || embedding.empty()) + return std::string(); + return requesting + "," + embedding; + } + + using StatusMap = base::hash_map; + StatusMap pmi_result_cache_; + + base::WeakPtrFactory weak_factory_; + + DISALLOW_COPY_AND_ASSIGN(LastRequestResultCache); +}; + namespace { void CallbackPermisisonStatusWrapper( + const base::WeakPtr& result_cache, const base::Callback& callback, + PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin, bool allowed) { - callback.Run(allowed ? content::PERMISSION_STATUS_GRANTED - : content::PERMISSION_STATUS_DENIED); + PermissionStatus status = allowed ? content::PERMISSION_STATUS_GRANTED + : content::PERMISSION_STATUS_DENIED; + if (result_cache.get()) { + result_cache->SetResult(permission, requesting_origin, embedding_origin, + status); + } + + callback.Run(status); } } // anonymous namespace AwPermissionManager::AwPermissionManager() - : content::PermissionManager() { + : content::PermissionManager(), result_cache_(new LastRequestResultCache) { } AwPermissionManager::~AwPermissionManager() { @@ -50,14 +185,21 @@ void AwPermissionManager::RequestPermission( return; } + const GURL& embedding_origin = + web_contents->GetLastCommittedURL().GetOrigin(); + switch (permission) { case content::PermissionType::GEOLOCATION: delegate->RequestGeolocationPermission( - origin, base::Bind(&CallbackPermisisonStatusWrapper, callback)); + origin, base::Bind(&CallbackPermisisonStatusWrapper, + result_cache_->GetWeakPtr(), callback, permission, + origin, embedding_origin)); break; case content::PermissionType::PROTECTED_MEDIA_IDENTIFIER: delegate->RequestProtectedMediaIdentifierPermission( - origin, base::Bind(&CallbackPermisisonStatusWrapper, callback)); + origin, base::Bind(&CallbackPermisisonStatusWrapper, + result_cache_->GetWeakPtr(), callback, permission, + origin, embedding_origin)); break; case content::PermissionType::MIDI_SYSEX: case content::PermissionType::NOTIFICATIONS: @@ -78,6 +220,13 @@ void AwPermissionManager::CancelPermissionRequest( content::WebContents* web_contents, int request_id, const GURL& origin) { + // The caller is canceling (presumably) the most recent request. Assuming the + // request did not complete, the user did not respond to the requset. + // Thus, assume we do not know the result. + const GURL& embedding_origin = + web_contents->GetLastCommittedURL().GetOrigin(); + result_cache_->ClearResult(permission, origin, embedding_origin); + int render_process_id = web_contents->GetRenderProcessHost()->GetID(); int render_view_id = web_contents->GetRenderViewHost()->GetRoutingID(); AwBrowserPermissionRequestDelegate* delegate = @@ -109,12 +258,19 @@ void AwPermissionManager::ResetPermission( content::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) { + result_cache_->ClearResult(permission, requesting_origin, embedding_origin); } content::PermissionStatus AwPermissionManager::GetPermissionStatus( content::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) { + // Method is called outside the Permissions API only for this permission. + if (permission == PermissionType::PROTECTED_MEDIA_IDENTIFIER) { + return result_cache_->GetResult(permission, requesting_origin, + embedding_origin); + } + return content::PERMISSION_STATUS_DENIED; } diff --git a/android_webview/browser/aw_permission_manager.h b/android_webview/browser/aw_permission_manager.h index 8028341fbc0ce..c23ce71e86160 100644 --- a/android_webview/browser/aw_permission_manager.h +++ b/android_webview/browser/aw_permission_manager.h @@ -7,10 +7,13 @@ #include "base/callback_forward.h" #include "base/macros.h" +#include "base/memory/scoped_ptr.h" #include "content/public/browser/permission_manager.h" namespace android_webview { +class LastRequestResultCache; + class AwPermissionManager : public content::PermissionManager { public: AwPermissionManager(); @@ -46,6 +49,8 @@ class AwPermissionManager : public content::PermissionManager { void UnsubscribePermissionStatusChange(int subscription_id) override; private: + scoped_ptr result_cache_; + DISALLOW_COPY_AND_ASSIGN(AwPermissionManager); }; diff --git a/android_webview/browser/scoped_app_gl_state_restore.cc b/android_webview/browser/scoped_app_gl_state_restore.cc index fe27753c17025..0f45ca3de0a08 100644 --- a/android_webview/browser/scoped_app_gl_state_restore.cc +++ b/android_webview/browser/scoped_app_gl_state_restore.cc @@ -297,8 +297,11 @@ ScopedAppGLStateRestoreImpl::ScopedAppGLStateRestoreImpl( i, GL_CURRENT_VERTEX_ATTRIB, vertex_attrib_[i].current_vertex_attrib); } - // Android 5.0.0 specific qualcomm workaround. See crbug.com/434570. - glBindRenderbufferEXT(GL_RENDERBUFFER, 0); + if (mode_ == ScopedAppGLStateRestore::MODE_RESOURCE_MANAGEMENT) { + // Android 5.0.0 specific qualcomm workaround. See crbug.com/434570. + glBindRenderbufferEXT(GL_RENDERBUFFER, 0); + } + DCHECK(ClearGLErrors(false, NULL)); } diff --git a/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java b/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java index 4f47587b71af0..6f2902ce3779e 100644 --- a/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java +++ b/android_webview/glue/java/src/com/android/webview/chromium/ResourceRewriter.java @@ -6,20 +6,18 @@ /** * Helper class used to fix up resource ids. - * This is mostly a copy of the code in frameworks/base/core/java/android/app/LoadedApk.java. - * TODO: Remove if a cleaner mechanism is provided (either public API or AAPT is changed to generate - * this code). */ class ResourceRewriter { /** * Rewrite the R 'constants' for the WebView library apk. */ public static void rewriteRValues(final int packageId) { - // TODO: We should use jarjar to remove the redundant R classes here, but due - // to a bug in jarjar it's not possible to rename classes with '$' in their name. - // See b/15684775. + // This list must be kept up to date to include all R classes depended on directly or + // indirectly by android_webview_java. + // TODO(torne): find a better way to do this, http://crbug.com/492166. com.android.webview.chromium.R.onResourcesLoaded(packageId); org.chromium.android_webview.R.onResourcesLoaded(packageId); + org.chromium.components.web_contents_delegate_android.R.onResourcesLoaded(packageId); org.chromium.content.R.onResourcesLoaded(packageId); org.chromium.ui.R.onResourcesLoaded(packageId); } diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java b/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java index 4427533bcaceb..38c013227cc1f 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java @@ -4,21 +4,15 @@ package org.chromium.android_webview; -import android.annotation.SuppressLint; -import android.content.ActivityNotFoundException; import android.content.Context; -import android.content.Intent; -import android.provider.Browser; import android.view.KeyEvent; import android.view.View; import android.webkit.URLUtil; import android.webkit.WebChromeClient; import android.widget.FrameLayout; -import org.chromium.base.Log; import org.chromium.content.browser.ContentVideoViewClient; import org.chromium.content.browser.ContentViewClient; -import org.chromium.content.browser.ContentViewCore; import org.chromium.content.browser.SelectActionMode; import org.chromium.content.browser.SelectActionModeCallback.ActionHandler; @@ -26,8 +20,6 @@ * ContentViewClient implementation for WebView */ public class AwContentViewClient extends ContentViewClient implements ContentVideoViewClient { - private static final String TAG = "AwContentViewClient"; - private final AwContentsClient mAwContentsClient; private final AwSettings mAwSettings; private final AwContents mAwContents; @@ -47,7 +39,6 @@ public void onBackgroundColorChanged(int color) { mAwContentsClient.onBackgroundColorChanged(color); } - @SuppressLint("NewApi") // Intent#getSelector requires API 15. @Override public void onStartContentIntent(Context context, String contentUrl) { if (mAwContentsClient.hasWebViewClient()) { @@ -56,35 +47,7 @@ public void onStartContentIntent(Context context, String contentUrl) { return; } - Intent intent; - // Perform generic parsing of the URI to turn it into an Intent. - try { - intent = Intent.parseUri(contentUrl, Intent.URI_INTENT_SCHEME); - } catch (Exception ex) { - Log.w(TAG, "Bad URI " + contentUrl, ex); - return; - } - // Sanitize the Intent, ensuring web pages can not bypass browser - // security (only access to BROWSABLE activities). - intent.addCategory(Intent.CATEGORY_BROWSABLE); - intent.setComponent(null); - Intent selector = intent.getSelector(); - if (selector != null) { - selector.addCategory(Intent.CATEGORY_BROWSABLE); - selector.setComponent(null); - } - // Pass the package name as application ID so that the intent from the - // same application can be opened in the same tab. - intent.putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName()); - if (ContentViewCore.activityFromContext(context) == null) { - intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - } - - try { - context.startActivity(intent); - } catch (ActivityNotFoundException ex) { - Log.w(TAG, "No application can handle " + contentUrl); - } + AwContentsClient.sendBrowsingIntent(context, contentUrl); } @Override @@ -191,6 +154,11 @@ public void exitFullscreen() { } } + @Override + public boolean isJavascriptEnabled() { + return mAwSettings != null && mAwSettings.getJavaScriptEnabled(); + } + @Override public boolean isExternalFlingActive() { return mAwContents.isFlingActive(); diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java index 972360b86b6ae..fa40447ce8978 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContents.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java @@ -100,6 +100,9 @@ public class AwContents implements SmartClipProvider, // produce little visible difference. private static final float ZOOM_CONTROLS_EPSILON = 0.007f; + private static final boolean FORCE_AUXILIARY_BITMAP_RENDERING = + "goldfish".equals(Build.HARDWARE); + /** * WebKit hit test related data structure. These are used to implement * getHitTestResult, requestFocusNodeHref, requestImageRef methods in WebView. @@ -275,6 +278,10 @@ public abstract static class VisualStateCallback { // through the resourcethrottle. This is only used for popup windows. private boolean mDeferredShouldOverrideUrlLoadingIsPendingForPopup; + // This is a workaround for some qualcomm devices discarding buffer on + // Activity restore. + private boolean mInvalidateRootViewOnNextDraw; + // The framework may temporarily detach our container view, for example during layout if // we are a child of a ListView. This may cause many toggles of View focus, which we suppress // when in this state. @@ -475,7 +482,11 @@ public boolean shouldIgnoreNavigation(NavigationParams navigationParams) { // If this is used for all navigations in future, cases for application initiated // load, redirect and backforward should also be filtered out. if (!navigationParams.isPost) { - ignoreNavigation = mContentsClient.shouldOverrideUrlLoading(url); + if (!mContentsClient.hasWebViewClient()) { + ignoreNavigation = AwContentsClient.sendBrowsingIntent(mContext, url); + } else { + ignoreNavigation = mContentsClient.shouldOverrideUrlLoading(url); + } } } // The shouldOverrideUrlLoading call might have resulted in posting messages to the @@ -663,7 +674,7 @@ public AwContents(AwBrowserContext browserContext, ViewGroup containerView, Cont mLayoutSizer.setDIPScale(mDIPScale); mWebContentsDelegate = new AwWebContentsDelegateAdapter( this, contentsClient, mContentViewClient, mContext, mContainerView); - mContentsClientBridge = new AwContentsClientBridge(contentsClient, + mContentsClientBridge = new AwContentsClientBridge(mContext, contentsClient, mBrowserContext.getKeyStore(), AwContentsStatics.getClientCertLookupTable()); mZoomControls = new AwZoomControls(this); mIoThreadClient = new IoThreadClientImpl(); @@ -1114,6 +1125,8 @@ public AwPdfExporter getPdfExporter() { public static void setAwDrawSWFunctionTable(long functionTablePointer) { nativeSetAwDrawSWFunctionTable(functionTablePointer); + // Force auxiliary bitmap rendering in emulators. + nativeSetForceAuxiliaryBitmapRendering(FORCE_AUXILIARY_BITMAP_RENDERING); } public static void setAwDrawGLFunctionTable(long functionTablePointer) { @@ -1301,8 +1314,7 @@ public void loadUrl(String url) { if (url == null) { return; } - LoadUrlParams params = new LoadUrlParams(url); - loadUrl(params); + loadUrl(url, null); } /** @@ -2101,7 +2113,11 @@ public boolean hasAccessedInitialDocument() { public void requestAccessibilitySnapshot(AccessibilitySnapshotCallback callback) { if (isDestroyed()) return; - mWebContents.requestAccessibilitySnapshot(callback); + if (!mWebContentsObserver.didEverCommitNavigation()) { + callback.onAccessibilitySnapshot(null); + return; + } + mWebContents.requestAccessibilitySnapshot(callback, 0, 0); } //-------------------------------------------------------------------------------------------- @@ -2209,6 +2225,8 @@ private void setViewVisibilityInternal(boolean visible) { } private void setWindowVisibilityInternal(boolean visible) { + mInvalidateRootViewOnNextDraw |= Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP + && visible && !mIsWindowVisible; mIsWindowVisible = visible; if (!isDestroyed()) nativeSetWindowVisibility(mNativeAwContents, mIsWindowVisible); } @@ -2292,14 +2310,14 @@ public AccessibilityNodeProvider getAccessibilityNodeProvider() { * @see android.webkit.WebView#onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo) */ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { - // TODO(boliu): remove this method. + if (!isDestroyed()) mContentViewCore.onInitializeAccessibilityNodeInfo(info); } /** * @see android.webkit.WebView#onInitializeAccessibilityEvent(AccessibilityEvent) */ public void onInitializeAccessibilityEvent(AccessibilityEvent event) { - // TODO(boliu): remove this method. + if (!isDestroyed()) mContentViewCore.onInitializeAccessibilityEvent(event); } public boolean supportsAccessibilityAction(int action) { @@ -2715,7 +2733,7 @@ public void onDraw(Canvas canvas) { mContainerView.getScrollX(), mContainerView.getScrollY(), globalVisibleRect.left, globalVisibleRect.top, globalVisibleRect.right, globalVisibleRect.bottom); - if (did_draw && canvas.isHardwareAccelerated()) { + if (did_draw && canvas.isHardwareAccelerated() && !FORCE_AUXILIARY_BITMAP_RENDERING) { did_draw = mNativeGLDelegate.requestDrawGL(canvas, false, mContainerView); } if (!did_draw) { @@ -2728,6 +2746,11 @@ public void onDraw(Canvas canvas) { mScrollOffsetManager.computeMaximumVerticalScrollOffset())) { postInvalidateOnAnimation(); } + + if (mInvalidateRootViewOnNextDraw) { + mContainerView.getRootView().invalidate(); + mInvalidateRootViewOnNextDraw = false; + } } @Override @@ -2991,6 +3014,8 @@ private boolean useLegacyGeolocationPermissionAPI() { private static native long nativeInit(AwBrowserContext browserContext); private static native void nativeDestroy(long nativeAwContents); + private static native void nativeSetForceAuxiliaryBitmapRendering( + boolean forceAuxiliaryBitmapRendering); private static native void nativeSetAwDrawSWFunctionTable(long functionTablePointer); private static native void nativeSetAwDrawGLFunctionTable(long functionTablePointer); private static native long nativeGetAwDrawGLFunction(); diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java index 5a07dc8740f2f..1def52cf1512b 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java @@ -6,6 +6,8 @@ import android.annotation.SuppressLint; import android.app.Activity; +import android.content.ActivityNotFoundException; +import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Picture; @@ -13,6 +15,8 @@ import android.net.http.SslError; import android.os.Looper; import android.os.Message; +import android.provider.Browser; +import android.util.Log; import android.view.KeyEvent; import android.view.View; import android.webkit.ConsoleMessage; @@ -22,6 +26,7 @@ import org.chromium.android_webview.permission.AwPermissionRequest; import org.chromium.base.annotations.SuppressFBWarnings; +import org.chromium.content.browser.ContentViewCore; import org.chromium.content.browser.SelectActionMode; import org.chromium.content.browser.SelectActionModeCallback.ActionHandler; @@ -38,7 +43,7 @@ * i.e.: all methods in this class should either be final, or abstract. */ public abstract class AwContentsClient { - + private static final String TAG = "AwContentsClient"; private final AwContentsClientCallbackHelper mCallbackHelper; // Last background color reported from the renderer. Holds the sentinal value INVALID_COLOR @@ -145,6 +150,42 @@ public abstract void onReceivedClientCertRequest( public abstract void onDownloadStart(String url, String userAgent, String contentDisposition, String mimeType, long contentLength); + public static boolean sendBrowsingIntent(Context context, String url) { + Intent intent; + // Perform generic parsing of the URI to turn it into an Intent. + try { + intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME); + } catch (Exception ex) { + Log.w(TAG, "Bad URI " + url, ex); + return false; + } + // Sanitize the Intent, ensuring web pages can not bypass browser + // security (only access to BROWSABLE activities). + intent.addCategory(Intent.CATEGORY_BROWSABLE); + intent.setComponent(null); + Intent selector = intent.getSelector(); + if (selector != null) { + selector.addCategory(Intent.CATEGORY_BROWSABLE); + selector.setComponent(null); + } + + // Pass the package name as application ID so that the intent from the + // same application can be opened in the same tab. + intent.putExtra(Browser.EXTRA_APPLICATION_ID, context.getPackageName()); + if (ContentViewCore.activityFromContext(context) == null) { + intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + } + + try { + context.startActivity(intent); + } catch (ActivityNotFoundException ex) { + Log.w(TAG, "No application can handle " + url); + return false; + } + + return true; + } + public static Uri[] parseFileChooserResult(int resultCode, Intent intent) { if (resultCode == Activity.RESULT_CANCELED) { return null; diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsClientBridge.java b/android_webview/java/src/org/chromium/android_webview/AwContentsClientBridge.java index 7b43742bb3a35..4e2aaeafa38ff 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContentsClientBridge.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClientBridge.java @@ -4,6 +4,7 @@ package org.chromium.android_webview; +import android.content.Context; import android.net.http.SslCertificate; import android.net.http.SslError; import android.util.Log; @@ -31,9 +32,10 @@ */ @JNINamespace("android_webview") public class AwContentsClientBridge { - static final String TAG = "AwContentsClientBridge"; + private static final String TAG = "AwContentsClientBridge"; private AwContentsClient mClient; + private Context mContext; // The native peer of this object. private long mNativeContentsClientBridge; @@ -48,9 +50,10 @@ protected AwContentsClientBridge(DefaultAndroidKeyStore keyStore, mLookupTable = table; } - public AwContentsClientBridge(AwContentsClient client, DefaultAndroidKeyStore keyStore, - ClientCertLookupTable table) { + public AwContentsClientBridge(Context context, AwContentsClient client, + DefaultAndroidKeyStore keyStore, ClientCertLookupTable table) { assert client != null; + mContext = context; mClient = client; mLocalKeyStore = keyStore; mLookupTable = table; @@ -258,7 +261,11 @@ private void handleJsBeforeUnload(String url, String message, int id) { @CalledByNative private boolean shouldOverrideUrlLoading(String url) { - return mClient.shouldOverrideUrlLoading(url); + if (mClient.hasWebViewClient()) { + return mClient.shouldOverrideUrlLoading(url); + } else { + return AwContentsClient.sendBrowsingIntent(mContext, url); + } } void confirmJsResult(int id, String prompt) { diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java b/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java index 500d22c0806a1..db40e4c475b78 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java @@ -89,6 +89,8 @@ private static class OnReceivedHttpErrorInfo { private static final int MSG_ON_SCALE_CHANGED_SCALED = 7; private static final int MSG_ON_RECEIVED_HTTP_ERROR = 8; private static final int MSG_ON_PAGE_FINISHED = 9; + private static final int MSG_ON_PROGRESS_CHANGED = 11; + private static final int MSG_SYNTHESIZE_PAGE_LOADING = 12; // Minimum period allowed between consecutive onNewPicture calls, to rate-limit the callbacks. private static final long ON_NEW_PICTURE_MIN_PERIOD_MILLIS = 500; @@ -163,6 +165,18 @@ public void handleMessage(Message msg) { mContentsClient.onPageFinished(url); break; } + case MSG_ON_PROGRESS_CHANGED: { + mContentsClient.onProgressChanged(msg.arg1); + break; + } + case MSG_SYNTHESIZE_PAGE_LOADING: { + final String url = (String) msg.obj; + mContentsClient.onPageStarted(url); + mContentsClient.onLoadResource(url); + mContentsClient.onProgressChanged(100); + mContentsClient.onPageFinished(url); + break; + } default: throw new IllegalStateException( "AwContentsClientCallbackHelper: unhandled message " + msg.what); @@ -229,4 +243,12 @@ public void postOnReceivedHttpError(AwContentsClient.AwWebResourceRequest reques public void postOnPageFinished(String url) { mHandler.sendMessage(mHandler.obtainMessage(MSG_ON_PAGE_FINISHED, url)); } + + public void postOnProgressChanged(int progress) { + mHandler.sendMessage(mHandler.obtainMessage(MSG_ON_PROGRESS_CHANGED, progress, 0)); + } + + public void postSynthesizedPageLoadingForUrlBarUpdate(String url) { + mHandler.sendMessage(mHandler.obtainMessage(MSG_SYNTHESIZE_PAGE_LOADING, url)); + } } diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java b/android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java index f38c73425150f..23bf2dc4e8db8 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java @@ -89,6 +89,10 @@ public static void setLegacyCacheRemovalDelayForTest(long timeoutMs) { nativeSetLegacyCacheRemovalDelayForTest(timeoutMs); } + public static String getProductVersion() { + return nativeGetProductVersion(); + } + //-------------------------------------------------------------------------------------------- // Native methods //-------------------------------------------------------------------------------------------- @@ -99,4 +103,5 @@ public static void setLegacyCacheRemovalDelayForTest(long timeoutMs) { private static native void nativeSetRecordFullDocument(boolean recordFullDocument); private static native void nativeRegisterCrashHandler(String version); private static native void nativeSetLegacyCacheRemovalDelayForTest(long timeoutMs); + private static native String nativeGetProductVersion(); } diff --git a/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java b/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java index e8c4a5dca09e7..bf5af89df0bf4 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java +++ b/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegate.java @@ -41,9 +41,4 @@ protected static native void nativeFilesSelectedInChooser(int processId, int ren @Override @CalledByNative public abstract void navigationStateChanged(int flags); - - // Not an override, because WebContentsDelegateAndroid maps this call - // into onLoad{Started|Stopped}. - @CalledByNative - public abstract void loadingStateChanged(); } diff --git a/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java b/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java index 0a9eca5055f25..7126d0ad0e223 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java +++ b/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java @@ -53,7 +53,7 @@ public void setContainerView(View containerView) { @Override public void onLoadProgressChanged(int progress) { - mContentsClient.onProgressChanged(progress); + mContentsClient.getCallbackHelper().postOnProgressChanged(progress); } @Override @@ -255,10 +255,7 @@ public void navigationStateChanged(int flags) { // the pending entry. String url = mAwContents.getLastCommittedUrl(); url = TextUtils.isEmpty(url) ? "about:blank" : url; - mContentsClient.onPageStarted(url); - mContentsClient.onLoadResource(url); - mContentsClient.onProgressChanged(100); - mContentsClient.onPageFinished(url); + mContentsClient.getCallbackHelper().postSynthesizedPageLoadingForUrlBarUpdate(url); } } @@ -271,11 +268,6 @@ public void toggleFullscreenModeForTab(boolean enterFullscreen) { } } - @Override - public void loadingStateChanged() { - mContentsClient.onReceivedTitle(mAwContents.getTitle()); - } - private static class GetDisplayNameTask extends AsyncTask { final int mProcessId; final int mRenderId; diff --git a/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java b/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java index ec722f61372f5..ba393eb133bcb 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java +++ b/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java @@ -23,6 +23,9 @@ public class AwWebContentsObserver extends WebContentsObserver { private final WeakReference mAwContents; private final WeakReference mAwContentsClient; + // Whether this webcontents has ever committed any navigation. + private boolean mCommittedNavigation; + public AwWebContentsObserver( WebContents webContents, AwContents awContents, AwContentsClient awContentsClient) { super(webContents); @@ -93,8 +96,13 @@ public void onComplete(long requestId) { @Override public void didNavigateAnyFrame(String url, String baseUrl, boolean isReload) { + mCommittedNavigation = true; final AwContentsClient client = mAwContentsClient.get(); if (client == null) return; client.doUpdateVisitedHistory(url, isReload); } + + public boolean didEverCommitNavigation() { + return mCommittedNavigation; + } } diff --git a/android_webview/java/strings/translations/android_webview_strings_bg.xtb b/android_webview/java/strings/translations/android_webview_strings_bg.xtb index c7e6e85bf0896..198940e3126c3 100644 --- a/android_webview/java/strings/translations/android_webview_strings_bg.xtb +++ b/android_webview/java/strings/translations/android_webview_strings_bg.xtb @@ -1,4 +1,4 @@ Функционалността не се поддържа в тази версия на Android. -Системни лицензи за изглед в мрежата +Системни лицензи за WebView \ No newline at end of file diff --git a/android_webview/java/strings/translations/android_webview_strings_sk.xtb b/android_webview/java/strings/translations/android_webview_strings_sk.xtb index c10bdadd2df22..30880ca9fdd0a 100644 --- a/android_webview/java/strings/translations/android_webview_strings_sk.xtb +++ b/android_webview/java/strings/translations/android_webview_strings_sk.xtb @@ -1,4 +1,4 @@ Táto funkcia nie je podporovaná v tejto verzii systému Android. -Licencie WebView systému +Systémové licencie WebView \ No newline at end of file diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java index a46797b82239c..dbd541e80198e 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java @@ -544,39 +544,176 @@ public void testPushAndNotificationsDisabled() throws Throwable { script)); } - /** - * Verifies that AX tree is returned. - */ - @Feature({"AndroidWebView"}) - @SmallTest - public void testRequestAccessibilitySnapshot() throws Throwable { + private static class AccessibilityCallbackHelper extends CallbackHelper { + + private AccessibilitySnapshotNode mRoot; + + public void notifyCalled(AccessibilitySnapshotNode root) { + mRoot = root; + super.notifyCalled(); + } + + public AccessibilitySnapshotNode getValue() { + return mRoot; + } + } + + private float mPageScale; + + private AccessibilitySnapshotNode receiveAccessibilitySnapshot(String data) throws Throwable { final AwTestContainerView testView = createAwTestContainerViewOnMainSync(mContentsClient); final AwContents awContents = testView.getAwContents(); final CallbackHelper loadHelper = mContentsClient.getOnPageFinishedHelper(); - loadDataSync(awContents, loadHelper, "", "text/html", false); + if (data != null) { + loadDataSync(awContents, loadHelper, data, "text/html", false); + } - final CallbackHelper callbackHelper = new CallbackHelper(); + final AccessibilityCallbackHelper callbackHelper = new AccessibilityCallbackHelper(); final AccessibilitySnapshotCallback callback = new AccessibilitySnapshotCallback() { @Override public void onAccessibilitySnapshot(AccessibilitySnapshotNode root) { - assertEquals(1, root.children.size()); - assertEquals("", root.text); - AccessibilitySnapshotNode child = root.children.get(0); - assertEquals(1, child.children.size()); - assertEquals("", child.text); - AccessibilitySnapshotNode grandChild = child.children.get(0); - assertEquals(0, grandChild.children.size()); - assertEquals("Click", grandChild.text); - callbackHelper.notifyCalled(); + callbackHelper.notifyCalled(root); } }; - + // read the callbackcount before executing the call on UI thread, since it may + // synchronously complete. + final int callbackCount = callbackHelper.getCallCount(); runTestOnUiThread(new Runnable() { @Override public void run() { awContents.requestAccessibilitySnapshot(callback); + mPageScale = awContents.getScale(); } }); - callbackHelper.waitForCallback(callbackHelper.getCallCount()); + callbackHelper.waitForCallback(callbackCount); + return callbackHelper.getValue(); + } + + /** + * Verifies that AX tree is returned. + */ + @Feature({"AndroidWebView"}) + @SmallTest + public void testRequestAccessibilitySnapshot() throws Throwable { + final String data = ""; + AccessibilitySnapshotNode root = receiveAccessibilitySnapshot(data); + assertEquals(1, root.children.size()); + assertEquals("", root.text); + AccessibilitySnapshotNode child = root.children.get(0); + assertEquals(1, child.children.size()); + assertEquals("", child.text); + AccessibilitySnapshotNode grandChild = child.children.get(0); + assertEquals(0, grandChild.children.size()); + assertEquals("Click", grandChild.text); + } + + @Feature({"AndroidWebView"}) + @SmallTest + public void testRequestAccessibilitySnapshotColors() throws Throwable { + final String data = "

color

"; + AccessibilitySnapshotNode root = receiveAccessibilitySnapshot(data); + assertEquals(1, root.children.size()); + assertEquals("", root.text); + AccessibilitySnapshotNode child = root.children.get(0); + assertEquals("color", child.text); + assertTrue(child.hasStyle); + assertEquals("ff123456", Integer.toHexString(child.color)); + assertEquals("ffabcdef", Integer.toHexString(child.bgcolor)); + } + + @Feature({"AndroidWebView"}) + @SmallTest + public void testRequestAccessibilitySnapshotFontSize() throws Throwable { + final String data = + "

foo

"; + AccessibilitySnapshotNode root = receiveAccessibilitySnapshot(data); + assertEquals(1, root.children.size()); + assertEquals("", root.text); + AccessibilitySnapshotNode child = root.children.get(0); + assertTrue(child.hasStyle); + assertEquals("foo", child.text); + assertEquals(11.0 * mPageScale, child.textSize, 0.01); + } + + @Feature({"AndroidWebView"}) + @SmallTest + public void testRequestAccessibilitySnapshotStyles() throws Throwable { + final String data = + "

foo

"; + AccessibilitySnapshotNode root = receiveAccessibilitySnapshot(data); + assertEquals(1, root.children.size()); + assertEquals("", root.text); + AccessibilitySnapshotNode child = root.children.get(0); + assertEquals("foo", child.text); + assertTrue(child.hasStyle); + assertTrue(child.bold); + assertTrue(child.italic); + assertFalse(child.lineThrough); + assertFalse(child.underline); + } + + @Feature({"AndroidWebView"}) + public void testRequestAccessibilitySnapshotStrongStyle() throws Throwable { + final String data = "

foo

bar

"; + AccessibilitySnapshotNode root = receiveAccessibilitySnapshot(data); + assertEquals(2, root.children.size()); + assertEquals("", root.text); + AccessibilitySnapshotNode child1 = root.children.get(0); + assertEquals("foo", child1.text); + assertTrue(child1.hasStyle); + assertFalse(child1.bold); + AccessibilitySnapshotNode child2 = root.children.get(1); + AccessibilitySnapshotNode child2child = child2.children.get(0); + assertEquals("bar", child2child.text); + assertEquals(child1.textSize, child2child.textSize); + assertTrue(child2child.bold); + } + + @Feature({"AndroidWebView"}) + public void testRequestAccessibilitySnapshotItalicStyle() throws Throwable { + final String data = "foo"; + AccessibilitySnapshotNode root = receiveAccessibilitySnapshot(data); + assertEquals(1, root.children.size()); + assertEquals("", root.text); + AccessibilitySnapshotNode child = root.children.get(0); + AccessibilitySnapshotNode grandchild = child.children.get(0); + assertEquals("foo", grandchild.text); + assertTrue(grandchild.hasStyle); + assertTrue(grandchild.italic); + } + + @Feature({"AndroidWebView"}) + public void testRequestAccessibilitySnapshotBoldStyle() throws Throwable { + final String data = "foo"; + AccessibilitySnapshotNode root = receiveAccessibilitySnapshot(data); + assertEquals(1, root.children.size()); + assertEquals("", root.text); + AccessibilitySnapshotNode child = root.children.get(0); + AccessibilitySnapshotNode grandchild = child.children.get(0); + assertEquals("foo", grandchild.text); + assertTrue(grandchild.hasStyle); + assertTrue(grandchild.bold); + } + + @Feature({"AndroidWebView"}) + @SmallTest + public void testRequestAccessibilitySnapshotNoStyle() throws Throwable { + final String data = "
"; + AccessibilitySnapshotNode root = receiveAccessibilitySnapshot(data); + assertEquals(1, root.children.size()); + assertEquals("", root.text); + AccessibilitySnapshotNode grandChild = root.children.get(0).children.get(0); + assertFalse(grandChild.hasStyle); + } + + @Feature({"AndroidWebView"}) + @SmallTest + public void testRequestAccessibilitySnapshotAboutBlank() throws Throwable { + AccessibilitySnapshotNode root = receiveAccessibilitySnapshot(null); + assertEquals(null, root); } } diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java index 14f18b915a95e..5a8c75d0d5885 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/NavigationHistoryTest.java @@ -320,23 +320,4 @@ public Boolean call() { } }); } - - // See http://crbug.com/481570 - @SmallTest - public void testTitleUpdatedWhenGoingBack() throws Throwable { - final TestCallbackHelperContainer.OnPageFinishedHelper onPageFinishedHelper = - mContentsClient.getOnPageFinishedHelper(); - NavigationHistory list = getNavigationHistory(mAwContents); - assertEquals(0, list.getEntryCount()); - - final String page1Url = addPage1ToServer(mWebServer); - final String page2Url = addPage2ToServer(mWebServer); - - loadUrlSync(mAwContents, onPageFinishedHelper, page1Url); - loadUrlSync(mAwContents, onPageFinishedHelper, page2Url); - assertEquals(PAGE_2_TITLE, mContentsClient.getUpdatedTitle()); - HistoryUtils.goBackSync(getInstrumentation(), mAwContents.getWebContents(), - onPageFinishedHelper); - assertEquals(PAGE_1_TITLE, mContentsClient.getUpdatedTitle()); - } } diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc index 3d3803eb64a13..73435079c4f37 100644 --- a/android_webview/lib/main/aw_main_delegate.cc +++ b/android_webview/lib/main/aw_main_delegate.cc @@ -90,6 +90,9 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) { // WebView does not currently support Web Speech API (crbug.com/487255) cl->AppendSwitch(switches::kDisableSpeechAPI); + // WebView does not currently support the Permissions API (crbug.com/490120) + cl->AppendSwitch(switches::kDisablePermissionsAPI); + // WebView does not (yet) save Chromium data during shutdown, so add setting // for Chrome to aggressively persist DOM Storage to minimize data loss. // http://crbug.com/479767 diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc index cc65cd7a3fa09..ffd65a9948f49 100644 --- a/android_webview/native/aw_contents.cc +++ b/android_webview/native/aw_contents.cc @@ -108,6 +108,8 @@ namespace { bool g_should_download_favicons = false; +bool g_force_auxiliary_bitmap_rendering = false; + const void* kAwContentsUserDataKey = &kAwContentsUserDataKey; class AwContentsUserData : public base::SupportsUserData::Data { @@ -310,6 +312,13 @@ static jlong Init(JNIEnv* env, jclass, jobject browser_context) { return reinterpret_cast(new AwContents(web_contents.Pass())); } +static void SetForceAuxiliaryBitmapRendering( + JNIEnv* env, + jclass, + jboolean force_auxiliary_bitmap_rendering) { + g_force_auxiliary_bitmap_rendering = force_auxiliary_bitmap_rendering; +} + static void SetAwDrawSWFunctionTable(JNIEnv* env, jclass, jlong function_table) { RasterHelperSetAwDrawSWFunctionTable( @@ -854,7 +863,7 @@ jboolean AwContents::RestoreFromOpaqueState( std::vector state_vector; base::android::JavaByteArrayToByteVector(env, state, &state_vector); - Pickle pickle(reinterpret_cast(state_vector.data()), + Pickle pickle(reinterpret_cast(state_vector.begin()), state_vector.size()); PickleIterator iterator(pickle); @@ -876,7 +885,8 @@ bool AwContents::OnDraw(JNIEnv* env, browser_view_renderer_.PrepareToDraw( scroll, gfx::Rect(visible_left, visible_top, visible_right - visible_left, visible_bottom - visible_top)); - if (is_hardware_accelerated && browser_view_renderer_.attached_to_window()) { + if (is_hardware_accelerated && browser_view_renderer_.attached_to_window() && + !g_force_auxiliary_bitmap_rendering) { return browser_view_renderer_.OnDrawHardware(); } @@ -892,8 +902,8 @@ bool AwContents::OnDraw(JNIEnv* env, // bitmap). For better performance, get global visible rect, transform it // from screen space to view space, then intersect with the webview in // viewspace. Use the resulting rect as the auxiliary bitmap. - scoped_ptr canvas_holder = - SoftwareCanvasHolder::Create(canvas, scroll, view_size); + scoped_ptr canvas_holder = SoftwareCanvasHolder::Create( + canvas, scroll, view_size, g_force_auxiliary_bitmap_rendering); if (!canvas_holder || !canvas_holder->GetCanvas()) { TRACE_EVENT_INSTANT0("android_webview", "EarlyOut_EmptySize", TRACE_EVENT_SCOPE_THREAD); diff --git a/android_webview/native/aw_contents_statics.cc b/android_webview/native/aw_contents_statics.cc index 8c2be127ce149..4b88a7eeb1aec 100644 --- a/android_webview/native/aw_contents_statics.cc +++ b/android_webview/native/aw_contents_statics.cc @@ -7,6 +7,7 @@ #include "android_webview/browser/aw_browser_context.h" #include "android_webview/browser/net/aw_url_request_context_getter.h" #include "android_webview/common/aw_crash_handler.h" +#include "android_webview/common/aw_version_info_values.h" #include "base/android/jni_string.h" #include "base/android/scoped_java_ref.h" #include "base/callback.h" @@ -98,6 +99,11 @@ void SetLegacyCacheRemovalDelayForTest(JNIEnv*, jclass, jlong delay_ms) { AwBrowserContext::SetLegacyCacheRemovalDelayForTest(delay_ms); } +// static +jstring GetProductVersion(JNIEnv* env, jclass) { + return base::android::ConvertUTF8ToJavaString(env, PRODUCT_VERSION).Release(); +} + bool RegisterAwContentsStatics(JNIEnv* env) { return RegisterNativesImpl(env); } diff --git a/android_webview/native/aw_picture.cc b/android_webview/native/aw_picture.cc index 348e1a0aefe1e..a46be2caf534e 100644 --- a/android_webview/native/aw_picture.cc +++ b/android_webview/native/aw_picture.cc @@ -33,8 +33,8 @@ jint AwPicture::GetHeight(JNIEnv* env, jobject obj) { void AwPicture::Draw(JNIEnv* env, jobject obj, jobject canvas) { const SkIRect bounds = picture_->cullRect().roundOut(); scoped_ptr canvas_holder = SoftwareCanvasHolder::Create( - canvas, gfx::Vector2d(), - gfx::Size(bounds.width(), bounds.height())); + canvas, gfx::Vector2d(), gfx::Size(bounds.width(), bounds.height()), + false); if (!canvas_holder || !canvas_holder->GetCanvas()) { LOG(ERROR) << "Couldn't draw picture"; return; diff --git a/android_webview/native/aw_web_contents_delegate.cc b/android_webview/native/aw_web_contents_delegate.cc index b1ac9d4f40a9a..d2a71e6e56c41 100644 --- a/android_webview/native/aw_web_contents_delegate.cc +++ b/android_webview/native/aw_web_contents_delegate.cc @@ -204,18 +204,6 @@ void AwWebContentsDelegate::ActivateContents(WebContents* contents) { } } -void AwWebContentsDelegate::LoadingStateChanged(WebContents* source, - bool to_different_document) { - // Page title may have changed, need to inform the embedder. - // |source| may be null if loading has started. - JNIEnv* env = AttachCurrentThread(); - - ScopedJavaLocalRef java_delegate = GetJavaDelegate(env); - if (java_delegate.obj()) { - Java_AwWebContentsDelegate_loadingStateChanged(env, java_delegate.obj()); - } -} - void AwWebContentsDelegate::RequestMediaAccessPermission( WebContents* web_contents, const content::MediaStreamRequest& request, diff --git a/android_webview/native/aw_web_contents_delegate.h b/android_webview/native/aw_web_contents_delegate.h index 031e29d9597f7..afc881bc7afa7 100644 --- a/android_webview/native/aw_web_contents_delegate.h +++ b/android_webview/native/aw_web_contents_delegate.h @@ -50,8 +50,6 @@ class AwWebContentsDelegate void CloseContents(content::WebContents* source) override; void ActivateContents(content::WebContents* contents) override; - void LoadingStateChanged(content::WebContents* source, - bool to_different_document) override; void RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, diff --git a/android_webview/native/java_browser_view_renderer_helper.cc b/android_webview/native/java_browser_view_renderer_helper.cc index 6e6ce39c51997..3a2ec0289b06f 100644 --- a/android_webview/native/java_browser_view_renderer_helper.cc +++ b/android_webview/native/java_browser_view_renderer_helper.cc @@ -152,11 +152,14 @@ void RasterHelperSetAwDrawSWFunctionTable(AwDrawSWFunctionTable* table) { scoped_ptr SoftwareCanvasHolder::Create( jobject java_canvas, const gfx::Vector2d& scroll_correction, - const gfx::Size& auxiliary_bitmap_size) { + const gfx::Size& auxiliary_bitmap_size, + bool force_auxiliary_bitmap) { JNIEnv* env = base::android::AttachCurrentThread(); - scoped_ptr holder( - new JavaCanvasHolder(env, java_canvas, scroll_correction)); - if (!holder->GetCanvas()) { + scoped_ptr holder; + if (!force_auxiliary_bitmap) { + holder.reset(new JavaCanvasHolder(env, java_canvas, scroll_correction)); + } + if (!holder.get() || !holder->GetCanvas()) { holder.reset(); holder.reset(new AuxiliaryCanvasHolder(env, java_canvas, scroll_correction, auxiliary_bitmap_size)); diff --git a/android_webview/native/java_browser_view_renderer_helper.h b/android_webview/native/java_browser_view_renderer_helper.h index cf3dace364901..874f008e2da21 100644 --- a/android_webview/native/java_browser_view_renderer_helper.h +++ b/android_webview/native/java_browser_view_renderer_helper.h @@ -22,7 +22,8 @@ class SoftwareCanvasHolder { static scoped_ptr Create( jobject java_canvas, const gfx::Vector2d& scroll_correction, - const gfx::Size& auxiliary_bitmap_size); + const gfx::Size& auxiliary_bitmap_size, + bool force_auxiliary_bitmap); virtual ~SoftwareCanvasHolder() {} diff --git a/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java b/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java index 1373a2b96dd8f..c95a4eaf94295 100644 --- a/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java +++ b/android_webview/test/shell/src/org/chromium/android_webview/test/AwTestContainerView.java @@ -15,6 +15,8 @@ import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.View; +import android.view.accessibility.AccessibilityEvent; +import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeProvider; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputConnection; @@ -409,6 +411,20 @@ public AccessibilityNodeProvider getAccessibilityNodeProvider() { return provider == null ? super.getAccessibilityNodeProvider() : provider; } + @Override + public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { + super.onInitializeAccessibilityNodeInfo(info); + info.setClassName(AwContents.class.getName()); + mAwContents.onInitializeAccessibilityNodeInfo(info); + } + + @Override + public void onInitializeAccessibilityEvent(AccessibilityEvent event) { + super.onInitializeAccessibilityEvent(event); + event.setClassName(AwContents.class.getName()); + mAwContents.onInitializeAccessibilityEvent(event); + } + @Override public boolean performAccessibilityAction(int action, Bundle arguments) { return mAwContents.performAccessibilityAction(action, arguments); diff --git a/ash/accelerators/accelerator_filter_unittest.cc b/ash/accelerators/accelerator_filter_unittest.cc index 12991369212c5..a4e9c297b5643 100644 --- a/ash/accelerators/accelerator_filter_unittest.cc +++ b/ash/accelerators/accelerator_filter_unittest.cc @@ -19,7 +19,6 @@ #include "ui/aura/window.h" #include "ui/base/accelerators/accelerator_history.h" #include "ui/events/event.h" -#include "ui/events/event_utils.h" #include "ui/events/test/event_generator.h" #include "ui/gfx/geometry/rect.h" @@ -135,34 +134,5 @@ TEST_F(AcceleratorFilterTest, CanConsumeSystemKeys) { } #endif // defined(OS_CHROMEOS) -// Tests that pressing 'SEARCH' + LeftMouseClick, which will be rewritten as a -// RightMouseClick, will not toggle the AppList. -// This test will fail without the code to clear the current accelerator in -// the accelerator history present in |AcceleratorFilter::OnMouseEvent()|. -TEST_F(AcceleratorFilterTest, SearchClickDoesntToggleAppList) { - ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow()); - - EXPECT_FALSE(ash::Shell::GetInstance()->GetAppListTargetVisibility()); - generator.PressKey(ui::VKEY_LWIN, 0); - generator.ClickLeftButton(); - generator.ReleaseKey(ui::VKEY_LWIN, 0); - EXPECT_FALSE(ash::Shell::GetInstance()->GetAppListTargetVisibility()); -} - -// Make sure that synthesized mouse events don't interfere with tracking -// the key accelerators. -TEST_F(AcceleratorFilterTest, SynthesizeMouseEventsAreIgnored) { - ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow()); - const gfx::Point origin(0, 0); - - EXPECT_FALSE(ash::Shell::GetInstance()->GetAppListTargetVisibility()); - generator.PressKey(ui::VKEY_LWIN, 0); - ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, origin, origin, - ui::EventTimeForNow(), ui::EF_IS_SYNTHESIZED, 0); - generator.Dispatch(&mouse_event); - generator.ReleaseKey(ui::VKEY_LWIN, 0); - EXPECT_TRUE(ash::Shell::GetInstance()->GetAppListTargetVisibility()); -} - } // namespace test } // namespace ash diff --git a/ash/accelerators/key_hold_detector.cc b/ash/accelerators/key_hold_detector.cc index 8326d9adb6b2a..46c17eadcb370 100644 --- a/ash/accelerators/key_hold_detector.cc +++ b/ash/accelerators/key_hold_detector.cc @@ -4,11 +4,6 @@ #include "ash/accelerators/key_hold_detector.h" -#include - -#undef RootWindow -#undef Status - #include "ash/shell.h" #include "base/message_loop/message_loop.h" #include "ui/aura/window_tracker.h" diff --git a/ash/ash_unittests.isolate b/ash/ash_unittests.isolate index 40e3e793c689e..4866e717ea166 100644 --- a/ash/ash_unittests.isolate +++ b/ash/ash_unittests.isolate @@ -41,7 +41,6 @@ ['OS=="linux"', { 'variables': { 'files': [ - '<(PRODUCT_DIR)/libffmpegsumo.so', '<(PRODUCT_DIR)/libosmesa.so', ], }, @@ -49,7 +48,6 @@ ['OS=="win"', { 'variables': { 'files': [ - '<(PRODUCT_DIR)/ffmpegsumo.dll', '<(PRODUCT_DIR)/osmesa.dll', ], }, diff --git a/ash/content/display/display_color_manager_chromeos.cc b/ash/content/display/display_color_manager_chromeos.cc index 9692e6243b806..1f177fde14444 100644 --- a/ash/content/display/display_color_manager_chromeos.cc +++ b/ash/content/display/display_color_manager_chromeos.cc @@ -11,6 +11,7 @@ #include "base/format_macros.h" #include "base/logging.h" #include "base/path_service.h" +#include "base/stl_util.h" #include "base/strings/stringprintf.h" #include "chromeos/chromeos_paths.h" #include "chromeos/chromeos_switches.h" @@ -91,11 +92,7 @@ DisplayColorManager::DisplayColorManager(ui::DisplayConfigurator* configurator) DisplayColorManager::~DisplayColorManager() { configurator_->RemoveObserver(this); - - for (auto it : calibration_map_) { - delete it.second; - calibration_map_.erase(it.first); - } + STLDeleteValues(&calibration_map_); } void DisplayColorManager::OnDisplayModeChanged( diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc index ec9e478c0c3b8..d406737098796 100644 --- a/ash/display/display_controller.cc +++ b/ash/display/display_controller.cc @@ -640,10 +640,15 @@ bool DisplayController::UpdateWorkAreaOfDisplayNearestWindow( void DisplayController::OnDisplayAdded(const gfx::Display& display) { #if defined(OS_CHROMEOS) - if (GetDisplayManager()->default_multi_display_mode() == - DisplayManager::UNIFIED) { - if (primary_display_id == gfx::Display::kInvalidDisplayID) - primary_display_id = display.id(); + // If we're switching from/to offscreen WTH, we need to + // create new WTH for primary display instead of reusing. + if (primary_tree_host_for_replace_ && + (GetRootWindowSettings(GetWindow(primary_tree_host_for_replace_)) + ->display_id == DisplayManager::kUnifiedDisplayId || + display.id() == DisplayManager::kUnifiedDisplayId)) { + DCHECK_EQ(gfx::Display::kInvalidDisplayID, primary_display_id); + primary_display_id = display.id(); + AshWindowTreeHost* ash_host = AddWindowTreeHostForDisplay(display, AshWindowTreeHostInitParams()); RootWindowController::CreateForSecondaryDisplay(ash_host); @@ -656,33 +661,31 @@ void DisplayController::OnDisplayAdded(const gfx::Display& display) { ->partial_magnification_controller() ->SwitchTargetRootWindow(ash_host->AsWindowTreeHost()->window()); - if (primary_tree_host_for_replace_) { - AshWindowTreeHost* to_delete = primary_tree_host_for_replace_; - primary_tree_host_for_replace_ = nullptr; - - // Show the shelf if the original WTH had a visible system - // tray. It may or may not be visible depending on OOBE state. - ash::SystemTray* old_tray = - GetRootWindowController(to_delete->AsWindowTreeHost()->window()) - ->GetSystemTray(); - ash::SystemTray* new_tray = - ash::Shell::GetInstance()->GetPrimarySystemTray(); - if (old_tray->GetWidget()->IsVisible()) { - new_tray->SetVisible(true); - new_tray->GetWidget()->Show(); - } + AshWindowTreeHost* to_delete = primary_tree_host_for_replace_; + primary_tree_host_for_replace_ = nullptr; + + // Show the shelf if the original WTH had a visible system + // tray. It may or may not be visible depending on OOBE state. + ash::SystemTray* old_tray = + GetRootWindowController(to_delete->AsWindowTreeHost()->window()) + ->GetSystemTray(); + ash::SystemTray* new_tray = + ash::Shell::GetInstance()->GetPrimarySystemTray(); + if (old_tray->GetWidget()->IsVisible()) { + new_tray->SetVisible(true); + new_tray->GetWidget()->Show(); + } - DeleteHost(to_delete); + DeleteHost(to_delete); #ifndef NDEBUG - auto iter = std::find_if( - window_tree_hosts_.begin(), window_tree_hosts_.end(), - [to_delete](const std::pair& pair) { - return pair.second == to_delete; - }); - DCHECK(iter == window_tree_hosts_.end()); + auto iter = std::find_if( + window_tree_hosts_.begin(), window_tree_hosts_.end(), + [to_delete](const std::pair& pair) { + return pair.second == to_delete; + }); + DCHECK(iter == window_tree_hosts_.end()); #endif - // the host has already been removed from the window_tree_host_. - } + // the host has already been removed from the window_tree_host_. } else #endif // TODO(oshima): It should be possible to consolidate logic for @@ -842,7 +845,10 @@ void DisplayController::PostDisplayConfigurationChange() { DisplayLayoutStore* layout_store = display_manager->layout_store(); if (display_manager->num_connected_displays() > 1) { DisplayIdPair pair = display_manager->GetCurrentDisplayIdPair(); - layout_store->UpdateMirrorStatus(pair, display_manager->IsInMirrorMode()); + layout_store->UpdateMultiDisplayState( + pair, display_manager->IsInMirrorMode(), + display_manager->default_multi_display_mode() == + DisplayManager::UNIFIED); if (Shell::GetScreen()->GetNumDisplays() > 1 ) { DisplayLayout layout = layout_store->GetRegisteredDisplayLayout(pair); diff --git a/ash/display/display_layout.cc b/ash/display/display_layout.cc index a733e762a8242..2cf54a6f2d51e 100644 --- a/ash/display/display_layout.cc +++ b/ash/display/display_layout.cc @@ -4,6 +4,7 @@ #include "ash/display/display_layout.h" +#include "ash/ash_switches.h" #include "ash/display/display_pref_util.h" #include "base/json/json_value_converter.h" #include "base/logging.h" @@ -24,6 +25,7 @@ const int kMaxValidOffset = 10000; const char kPositionKey[] = "position"; const char kOffsetKey[] = "offset"; const char kMirroredKey[] = "mirrored"; +const char kDefaultUnifiedKey[] = "default_unified"; const char kPrimaryIdKey[] = "primary-id"; typedef std::map PositionToStringMap; @@ -69,6 +71,11 @@ DisplayLayout::DisplayLayout() : position(RIGHT), offset(0), mirrored(false), +#if defined(OS_CHROMEOS) + default_unified(switches::UnifiedDesktopEnabled()), +#else + default_unified(false), +#endif primary_id(gfx::Display::kInvalidDisplayID) { } @@ -76,6 +83,11 @@ DisplayLayout::DisplayLayout(DisplayLayout::Position position, int offset) : position(position), offset(offset), mirrored(false), +#if defined(OS_CHROMEOS) + default_unified(switches::UnifiedDesktopEnabled()), +#else + default_unified(false), +#endif primary_id(gfx::Display::kInvalidDisplayID) { DCHECK_LE(TOP, position); DCHECK_GE(LEFT, position); @@ -127,15 +139,16 @@ bool DisplayLayout::ConvertToValue(const DisplayLayout& layout, dict_value->SetString(kPositionKey, position_str); dict_value->SetInteger(kOffsetKey, layout.offset); dict_value->SetBoolean(kMirroredKey, layout.mirrored); + dict_value->SetBoolean(kDefaultUnifiedKey, layout.default_unified); dict_value->SetString(kPrimaryIdKey, base::Int64ToString(layout.primary_id)); return true; } std::string DisplayLayout::ToString() const { const std::string position_str = GetStringFromPosition(position); - return base::StringPrintf( - "%s, %d%s", - position_str.c_str(), offset, mirrored ? ", mirrored" : ""); + return base::StringPrintf("%s, %d%s%s", position_str.c_str(), offset, + mirrored ? ", mirrored" : "", + default_unified ? ", unified" : ""); } // static @@ -145,6 +158,8 @@ void DisplayLayout::RegisterJSONConverter( kPositionKey, &DisplayLayout::position, &GetPositionFromString); converter->RegisterIntField(kOffsetKey, &DisplayLayout::offset); converter->RegisterBoolField(kMirroredKey, &DisplayLayout::mirrored); + converter->RegisterBoolField(kDefaultUnifiedKey, + &DisplayLayout::default_unified); converter->RegisterCustomField( kPrimaryIdKey, &DisplayLayout::primary_id, &GetDisplayIdFromString); } diff --git a/ash/display/display_layout.h b/ash/display/display_layout.h index dc322087c2f1b..df966b2f93bc0 100644 --- a/ash/display/display_layout.h +++ b/ash/display/display_layout.h @@ -59,6 +59,9 @@ struct ASH_EXPORT DisplayLayout { // True if displays are mirrored. bool mirrored; + // True if multi displays should default to unified mode. + bool default_unified; + // The id of the display used as a primary display. int64 primary_id; diff --git a/ash/display/display_layout_store.cc b/ash/display/display_layout_store.cc index 466adbf4920b3..3ef9134d01d12 100644 --- a/ash/display/display_layout_store.cc +++ b/ash/display/display_layout_store.cc @@ -6,6 +6,8 @@ #include "ash/ash_switches.h" #include "ash/display/display_layout_store.h" +#include "ash/display/display_manager.h" +#include "ash/shell.h" #include "base/command_line.h" #include "base/logging.h" #include "ui/gfx/display.h" @@ -46,7 +48,13 @@ void DisplayLayoutStore::RegisterLayoutForDisplayIdPair( int64 id1, int64 id2, const DisplayLayout& layout) { - paired_layouts_[std::make_pair(id1, id2)] = layout; + auto key = std::make_pair(id1, id2); + paired_layouts_[key] = layout; +#if defined(OS_CHROMEOS) + // Force disabling unified desktop if the flag is not set. + if (!switches::UnifiedDesktopEnabled()) + paired_layouts_[key].default_unified = false; +#endif } DisplayLayout DisplayLayoutStore::GetRegisteredDisplayLayout( @@ -67,11 +75,13 @@ DisplayLayout DisplayLayoutStore::ComputeDisplayLayoutForDisplayIdPair( pair.first == layout.primary_id) ? layout : layout.Invert(); } -void DisplayLayoutStore::UpdateMirrorStatus(const DisplayIdPair& pair, - bool mirrored) { +void DisplayLayoutStore::UpdateMultiDisplayState(const DisplayIdPair& pair, + bool mirrored, + bool default_unified) { if (paired_layouts_.find(pair) == paired_layouts_.end()) CreateDisplayLayout(pair); paired_layouts_[pair].mirrored = mirrored; + paired_layouts_[pair].default_unified = default_unified; } void DisplayLayoutStore::UpdatePrimaryDisplayId(const DisplayIdPair& pair, diff --git a/ash/display/display_layout_store.h b/ash/display/display_layout_store.h index a967537126986..6841ea906aa5f 100644 --- a/ash/display/display_layout_store.h +++ b/ash/display/display_layout_store.h @@ -37,11 +37,12 @@ class ASH_EXPORT DisplayLayoutStore { DisplayLayout ComputeDisplayLayoutForDisplayIdPair( const DisplayIdPair& display_pair); - // Update the mirrored flag in the display layout for + // Update the multi display state in the display layout for // |display_pair|. This creates new display layout if no layout is // registered for |display_pair|. - void UpdateMirrorStatus(const DisplayIdPair& display_pair, - bool mirrored); + void UpdateMultiDisplayState(const DisplayIdPair& display_pair, + bool mirrored, + bool default_unified); // Update the |primary_id| in the display layout for // |display_pair|. This creates new display layout if no layout is diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc index 3a42d1ab86c84..98a14e5350438 100644 --- a/ash/display/display_manager.cc +++ b/ash/display/display_manager.cc @@ -140,9 +140,6 @@ DisplayManager::DisplayManager() if (base::SysInfo::IsRunningOnChromeOS()) DisplayInfo::SetUse125DSFForUIScaling(true); - if (switches::UnifiedDesktopEnabled()) - multi_display_mode_ = default_multi_display_mode_ = UNIFIED; - change_display_upon_host_resize_ = !base::SysInfo::IsRunningOnChromeOS(); #endif gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_.get()); @@ -463,6 +460,8 @@ void DisplayManager::RegisterDisplayProperty( if (display_info_.find(display_id) == display_info_.end()) display_info_[display_id] = DisplayInfo(display_id, std::string(), false); + display_info_[display_id].SetRotation(rotation, + gfx::Display::ROTATION_SOURCE_USER); display_info_[display_id].SetRotation(rotation, gfx::Display::ROTATION_SOURCE_ACTIVE); display_info_[display_id].SetColorProfile(color_profile); @@ -641,6 +640,8 @@ void DisplayManager::OnNativeDisplaysChanged( if (gfx::Display::HasInternalDisplay() && !internal_display_connected && display_info_.find(gfx::Display::InternalDisplayId()) == display_info_.end()) { + // Create a dummy internal display if the chrome restarted + // in docked mode. DisplayInfo internal_display_info( gfx::Display::InternalDisplayId(), l10n_util::GetStringUTF8(IDS_ASH_INTERNAL_DISPLAY_NAME), @@ -648,6 +649,25 @@ void DisplayManager::OnNativeDisplaysChanged( internal_display_info.SetBounds(gfx::Rect(0, 0, 800, 600)); display_info_[gfx::Display::InternalDisplayId()] = internal_display_info; } + +#if defined(OS_CHROMEOS) + if (new_display_info_list.size() > 1) { + std::sort(new_display_info_list.begin(), new_display_info_list.end(), + DisplayInfoSortFunctor()); + DisplayIdPair pair = std::make_pair(new_display_info_list[0].id(), + new_display_info_list[1].id()); + DisplayLayout layout = layout_store_->GetRegisteredDisplayLayout(pair); + default_multi_display_mode_ = + (layout.default_unified && switches::UnifiedDesktopEnabled()) + ? UNIFIED + : EXTENDED; + // Mirror mode is set by DisplayConfigurator on the device. + // Emulate it when running on linux desktop. + if (!base::SysInfo::IsRunningOnChromeOS() && layout.mirrored) + SetMultiDisplayMode(MIRRORING); + } +#endif + UpdateDisplays(new_display_info_list); } @@ -674,6 +694,9 @@ void DisplayManager::UpdateDisplays( new_display_info_list.end(), DisplayInfoSortFunctor()); + if (multi_display_mode_ != MIRRORING) + multi_display_mode_ = default_multi_display_mode_; + CreateSoftwareMirroringDisplayInfo(&new_display_info_list); // Close the mirroring window if any here to avoid creating two compositor on @@ -951,9 +974,8 @@ void DisplayManager::SetMirrorMode(bool mirror) { ++iter) { display_info_list.push_back(GetDisplayInfo(iter->id())); } - - SetSoftwareMirroring(mirror); - UpdateDisplays(display_info_list); + multi_display_mode_ = mirror ? MIRRORING : default_multi_display_mode_; + ReconfigureDisplays(); if (Shell::GetInstance()->display_configurator_animation()) { Shell::GetInstance()->display_configurator_animation()-> StartFadeInAnimation(); @@ -1017,12 +1039,30 @@ void DisplayManager::SetMultiDisplayMode(MultiDisplayMode mode) { } void DisplayManager::SetDefaultMultiDisplayMode(MultiDisplayMode mode) { - // TODO(oshima): Remove this constrain. - DCHECK_EQ(default_multi_display_mode_, EXTENDED); - DCHECK_EQ(mode, UNIFIED); + DCHECK_NE(mode, MIRRORING); default_multi_display_mode_ = mode; } +void DisplayManager::ReconfigureDisplays() { + DisplayInfoList display_info_list; + for (DisplayList::const_iterator iter = active_display_list_.begin(); + (display_info_list.size() < 2 && iter != active_display_list_.end()); + ++iter) { + if (iter->id() == kUnifiedDisplayId) + continue; + display_info_list.push_back(GetDisplayInfo(iter->id())); + } + for (auto iter = software_mirroring_display_list_.begin(); + (display_info_list.size() < 2 && + iter != software_mirroring_display_list_.end()); + ++iter) { + display_info_list.push_back(GetDisplayInfo(iter->id())); + } + mirroring_display_id_ = gfx::Display::kInvalidDisplayID; + software_mirroring_display_list_.clear(); + UpdateDisplays(display_info_list); +} + bool DisplayManager::UpdateDisplayBounds(int64 display_id, const gfx::Rect& new_bounds) { if (change_display_upon_host_resize_) { diff --git a/ash/display/display_manager.h b/ash/display/display_manager.h index b6ac0926c04b0..59b0b7476009f 100644 --- a/ash/display/display_manager.h +++ b/ash/display/display_manager.h @@ -83,7 +83,7 @@ class ASH_EXPORT DisplayManager // the 2nd display. (Software Mirroring). // 3) UNIFIED mode creates single desktop across multiple displays. enum MultiDisplayMode { - EXTENDED, + EXTENDED = 0, MIRRORING, UNIFIED, }; @@ -297,6 +297,11 @@ class ASH_EXPORT DisplayManager return default_multi_display_mode_; } + // Reconfigure display configuration using the same + // physical display. TODO(oshima): Refactor and move this + // impl to |SetDefaultMultiDisplayMode|. + void ReconfigureDisplays(); + // Update the bounds of the display given by |display_id|. bool UpdateDisplayBounds(int64 display_id, const gfx::Rect& new_bounds); diff --git a/ash/display/display_manager_unittest.cc b/ash/display/display_manager_unittest.cc index fbb737cfdc97e..c81c40b5f5455 100644 --- a/ash/display/display_manager_unittest.cc +++ b/ash/display/display_manager_unittest.cc @@ -123,12 +123,8 @@ class DisplayManagerTest : public test::AshTestBase, // aura::WindowObserver overrides: void OnWindowDestroying(aura::Window* window) override { - // TODO(oshima): When moving between unified desktop, the - // primary root window can be deleted. - if (!display_manager()->IsInUnifiedMode()) { - ASSERT_EQ(Shell::GetPrimaryRootWindow(), window); - root_window_destroyed_ = true; - } + ASSERT_EQ(Shell::GetPrimaryRootWindow(), window); + root_window_destroyed_ = true; } private: @@ -1467,11 +1463,14 @@ TEST_F(DisplayManagerTest, MAYBE_UpdateDisplayWithHostOrigin) { TEST_F(DisplayManagerTest, UnifiedDesktopBasic) { if (!SupportsMultipleDisplays()) return; + test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); + + // Don't check root window destruction in unified mode. + Shell::GetPrimaryRootWindow()->RemoveObserver(this); - display_manager()->SetDefaultMultiDisplayMode(DisplayManager::UNIFIED); - display_manager()->SetMultiDisplayMode(DisplayManager::UNIFIED); UpdateDisplay("300x200,400x500"); + // Defaults to the unified desktop. gfx::Screen* screen = gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_ALTERNATE); EXPECT_EQ("700x500", screen->GetPrimaryDisplay().size().ToString()); @@ -1482,21 +1481,45 @@ TEST_F(DisplayManagerTest, UnifiedDesktopBasic) { display_manager()->SetMirrorMode(false); EXPECT_EQ("700x500", screen->GetPrimaryDisplay().size().ToString()); - // Swithc to single desktop. + // Switch to single desktop. UpdateDisplay("500x300"); EXPECT_EQ("500x300", screen->GetPrimaryDisplay().size().ToString()); - // Swithc to unified desktop. + // Switch to unified desktop. UpdateDisplay("500x300,400x500"); EXPECT_EQ("900x500", screen->GetPrimaryDisplay().size().ToString()); + + // Switch back to extended desktop. + display_manager()->SetDefaultMultiDisplayMode(DisplayManager::EXTENDED); + display_manager()->ReconfigureDisplays(); + EXPECT_EQ("500x300", screen->GetPrimaryDisplay().size().ToString()); + EXPECT_EQ("400x500", ScreenUtil::GetSecondaryDisplay().size().ToString()); +} + +// Updating displays again in unified desktop mode should not crash. +// crbug.com/491094. +TEST_F(DisplayManagerTest, ConfigureUnifiedTwice) { + if (!SupportsMultipleDisplays()) + return; + // Don't check root window destruction in unified mode. + Shell::GetPrimaryRootWindow()->RemoveObserver(this); + + UpdateDisplay("300x200,400x500"); + // Mirror windows are created in a posted task. + RunAllPendingInMessageLoop(); + + UpdateDisplay("300x250,400x550"); + RunAllPendingInMessageLoop(); } TEST_F(DisplayManagerTest, RotateUnifiedDesktop) { if (!SupportsMultipleDisplays()) return; + test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); + + // Don't check root window destruction in unified mode. + Shell::GetPrimaryRootWindow()->RemoveObserver(this); - display_manager()->SetDefaultMultiDisplayMode(DisplayManager::UNIFIED); - display_manager()->SetMultiDisplayMode(DisplayManager::UNIFIED); UpdateDisplay("300x200,400x500"); gfx::Screen* screen = @@ -1519,9 +1542,11 @@ TEST_F(DisplayManagerTest, RotateUnifiedDesktop) { TEST_F(DisplayManagerTest, UnifiedWithDockWindows) { if (!SupportsMultipleDisplays()) return; + test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); + + // Don't check root window destruction in unified mode. + Shell::GetPrimaryRootWindow()->RemoveObserver(this); - display_manager()->SetDefaultMultiDisplayMode(DisplayManager::UNIFIED); - display_manager()->SetMultiDisplayMode(DisplayManager::UNIFIED); UpdateDisplay("300x200,400x500"); scoped_ptr docked( @@ -1693,6 +1718,20 @@ TEST_F(DisplayManagerFontTest, DisplayInfo::SetUse125DSFForUIScaling(false); } +TEST_F(DisplayManagerTest, CheckInitializationOfRotationProperty) { + int64_t id = display_manager()->GetDisplayAt(0).id(); + display_manager()->RegisterDisplayProperty(id, gfx::Display::ROTATE_90, 1.0f, + nullptr, gfx::Size(), 1.0f, + ui::COLOR_PROFILE_STANDARD); + + const DisplayInfo& info = display_manager()->GetDisplayInfo(id); + + EXPECT_EQ(gfx::Display::ROTATE_90, + info.GetRotation(gfx::Display::ROTATION_SOURCE_USER)); + EXPECT_EQ(gfx::Display::ROTATE_90, + info.GetRotation(gfx::Display::ROTATION_SOURCE_ACTIVE)); +} + #endif // OS_CHROMEOS } // namespace ash diff --git a/ash/display/mirror_window_controller.cc b/ash/display/mirror_window_controller.cc index 529353713927e..b7e2a11d13a34 100644 --- a/ash/display/mirror_window_controller.cc +++ b/ash/display/mirror_window_controller.cc @@ -120,6 +120,14 @@ class NoneCaptureClient : public aura::client::CaptureClient { DISALLOW_COPY_AND_ASSIGN(NoneCaptureClient); }; +DisplayManager::MultiDisplayMode GetCurrentMultiDisplayMode() { + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); + return display_manager->IsInUnifiedMode() + ? DisplayManager::UNIFIED + : (display_manager->IsInMirrorMode() ? DisplayManager::MIRRORING + : DisplayManager::EXTENDED); +} + } // namespace struct MirrorWindowController::MirroringHostInfo { @@ -153,8 +161,26 @@ void MirrorWindowController::UpdateWindow( const DisplayInfo& source_display_info = display_manager->GetDisplayInfo(primary.id()); + multi_display_mode_ = GetCurrentMultiDisplayMode(); + gfx::Point mirroring_origin; for (const DisplayInfo& display_info : display_info_list) { + scoped_ptr transformer; + if (display_manager->IsInMirrorMode()) { + transformer.reset(CreateRootWindowTransformerForMirroredDisplay( + source_display_info, display_info)); + } else if (display_manager->IsInUnifiedMode()) { + gfx::Display display; + display.SetScaleAndBounds( + 1.0f, + gfx::Rect(mirroring_origin, display_info.bounds_in_native().size())); + mirroring_origin.SetPoint(display.bounds().right(), 0); + transformer.reset(CreateRootWindowTransformerForUnifiedDesktop( + primary.bounds(), display)); + } else { + NOTREACHED(); + } + if (mirroring_host_info_map_.find(display_info.id()) == mirroring_host_info_map_.end()) { AshWindowTreeHostInitParams init_params; @@ -201,6 +227,7 @@ void MirrorWindowController::UpdateWindow( new aura::Window(nullptr); mirror_window->Init(ui::LAYER_SOLID_COLOR); host->window()->AddChild(mirror_window); + host_info->ash_host->SetRootWindowTransformer(transformer.Pass()); mirror_window->SetBounds(host->window()->bounds()); mirror_window->Show(); if (reflector_) { @@ -212,32 +239,13 @@ void MirrorWindowController::UpdateWindow( mirror_window->layer()); } } else { - aura::WindowTreeHost* host = mirroring_host_info_map_[display_info.id()] - ->ash_host->AsWindowTreeHost(); + AshWindowTreeHost* ash_host = + mirroring_host_info_map_[display_info.id()]->ash_host.get(); + aura::WindowTreeHost* host = ash_host->AsWindowTreeHost(); GetRootWindowSettings(host->window())->display_id = display_info.id(); + ash_host->SetRootWindowTransformer(transformer.Pass()); host->SetBounds(display_info.bounds_in_native()); } - - AshWindowTreeHost* mirroring_ash_host = - mirroring_host_info_map_[display_info.id()]->ash_host.get(); - if (display_manager->IsInMirrorMode()) { - scoped_ptr transformer( - CreateRootWindowTransformerForMirroredDisplay(source_display_info, - display_info)); - mirroring_ash_host->SetRootWindowTransformer(transformer.Pass()); - } else if (display_manager->IsInUnifiedMode()) { - gfx::Display display; - display.SetScaleAndBounds( - 1.0f, - gfx::Rect(mirroring_origin, display_info.bounds_in_native().size())); - mirroring_origin.SetPoint(display.bounds().right(), 0); - scoped_ptr transformer( - CreateRootWindowTransformerForUnifiedDesktop(primary.bounds(), - display)); - mirroring_ash_host->SetRootWindowTransformer(transformer.Pass()); - } else { - NOTREACHED(); - } } // Deleting WTHs for disconnected displays. @@ -268,13 +276,7 @@ void MirrorWindowController::UpdateWindow() { } void MirrorWindowController::CloseIfNotNecessary() { - DisplayManager* display_manager = Shell::GetInstance()->display_manager(); - - DisplayManager::MultiDisplayMode new_mode = - display_manager->IsInUnifiedMode() - ? DisplayManager::UNIFIED - : (display_manager->IsInMirrorMode() ? DisplayManager::MIRRORING - : DisplayManager::EXTENDED); + DisplayManager::MultiDisplayMode new_mode = GetCurrentMultiDisplayMode(); if (multi_display_mode_ != new_mode) Close(true); multi_display_mode_ = new_mode; @@ -300,8 +302,8 @@ void MirrorWindowController::OnHostResized(const aura::WindowTreeHost* host) { return; info->mirror_window_host_size = host->GetBounds().size(); reflector_->OnMirroringCompositorResized(); - info->ash_host->SetRootWindowTransformer( - CreateRootWindowTransformer().Pass()); + // No need to update the transformer as new transformer is already set + // in UpdateWindow. Shell::GetInstance() ->display_controller() ->cursor_window_controller() @@ -313,7 +315,6 @@ void MirrorWindowController::OnHostResized(const aura::WindowTreeHost* host) { aura::Window* MirrorWindowController::GetWindow() { DisplayManager* display_manager = Shell::GetInstance()->display_manager(); - // TODO(oshima): Support software cursor in Unified Mode. if (!display_manager->IsInMirrorMode() || mirroring_host_info_map_.empty()) return nullptr; DCHECK_EQ(1U, mirroring_host_info_map_.size()); @@ -381,17 +382,4 @@ void MirrorWindowController::CloseAndDeleteHost(MirroringHostInfo* host_info, delete host_info; } -scoped_ptr -MirrorWindowController::CreateRootWindowTransformer() const { - DisplayManager* display_manager = Shell::GetInstance()->display_manager(); - const DisplayInfo& mirror_display_info = - display_manager->GetDisplayInfo(display_manager->mirroring_display_id()); - const DisplayInfo& source_display_info = display_manager->GetDisplayInfo( - Shell::GetScreen()->GetPrimaryDisplay().id()); - DCHECK(display_manager->IsInMirrorMode()); - return scoped_ptr( - CreateRootWindowTransformerForMirroredDisplay(source_display_info, - mirror_display_info)); -} - } // namespace ash diff --git a/ash/display/mirror_window_controller.h b/ash/display/mirror_window_controller.h index 9f38102bc4aaa..d46088598268e 100644 --- a/ash/display/mirror_window_controller.h +++ b/ash/display/mirror_window_controller.h @@ -90,10 +90,6 @@ class ASH_EXPORT MirrorWindowController : public aura::WindowTreeHostObserver { void CloseAndDeleteHost(MirroringHostInfo* host_info, bool delay_host_deletion); - // Creates a RootWindowTransformer for current display - // configuration. - scoped_ptr CreateRootWindowTransformer() const; - typedef std::map MirroringHostInfoMap; MirroringHostInfoMap mirroring_host_info_map_; diff --git a/ash/display/root_window_transformers_unittest.cc b/ash/display/root_window_transformers_unittest.cc index 1036b318a8e96..39e8c64814ecb 100644 --- a/ash/display/root_window_transformers_unittest.cc +++ b/ash/display/root_window_transformers_unittest.cc @@ -112,6 +112,19 @@ float GetStoredUIScale(int64 id) { GetEffectiveUIScale(); } +scoped_ptr +CreateCurrentRootWindowTransformerForMirroring() { + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); + DCHECK(display_manager->IsInMirrorMode()); + const DisplayInfo& mirror_display_info = + display_manager->GetDisplayInfo(display_manager->mirroring_display_id()); + const DisplayInfo& source_display_info = display_manager->GetDisplayInfo( + Shell::GetScreen()->GetPrimaryDisplay().id()); + return scoped_ptr( + CreateRootWindowTransformerForMirroredDisplay(source_display_info, + mirror_display_info)); +} + } // namespace typedef test::AshTestBase RootWindowTransformersTest; @@ -396,13 +409,13 @@ TEST_F(RootWindowTransformersTest, LetterBoxPillarBox) { display_manager->SetMultiDisplayMode(DisplayManager::MIRRORING); UpdateDisplay("400x200,500x500"); scoped_ptr transformer( - test_api.CreateCurrentRootWindowTransformer()); + CreateCurrentRootWindowTransformerForMirroring()); // Y margin must be margin is (500 - 500/400 * 200) / 2 = 125. EXPECT_EQ("0,125,0,125", transformer->GetHostInsets().ToString()); UpdateDisplay("200x400,500x500"); // The aspect ratio is flipped, so X margin is now 125. - transformer = test_api.CreateCurrentRootWindowTransformer(); + transformer = CreateCurrentRootWindowTransformerForMirroring(); EXPECT_EQ("125,0,125,0", transformer->GetHostInsets().ToString()); } diff --git a/ash/display/unified_mouse_warp_controller_unittest.cc b/ash/display/unified_mouse_warp_controller_unittest.cc index 1dfa168ee2df8..fa450ce0cac26 100644 --- a/ash/display/unified_mouse_warp_controller_unittest.cc +++ b/ash/display/unified_mouse_warp_controller_unittest.cc @@ -4,8 +4,6 @@ #include "ash/display/unified_mouse_warp_controller.h" -#include "ash/display/display_layout_store.h" -#include "ash/display/display_manager.h" #include "ash/display/mouse_cursor_event_filter.h" #include "ash/shell.h" #include "ash/test/ash_test_base.h" @@ -24,9 +22,7 @@ class UnifiedMouseWarpControllerTest : public test::AshTestBase { void SetUp() override { test::AshTestBase::SetUp(); - DisplayManager* display_manager = Shell::GetInstance()->display_manager(); - display_manager->SetDefaultMultiDisplayMode(DisplayManager::UNIFIED); - display_manager->SetMultiDisplayMode(DisplayManager::UNIFIED); + test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); } protected: diff --git a/ash/host/ash_window_tree_host_unified.cc b/ash/host/ash_window_tree_host_unified.cc index d213c87401dd5..b36223ffcaf72 100644 --- a/ash/host/ash_window_tree_host_unified.cc +++ b/ash/host/ash_window_tree_host_unified.cc @@ -53,6 +53,9 @@ AshWindowTreeHostUnified::AshWindowTreeHostUnified( } AshWindowTreeHostUnified::~AshWindowTreeHostUnified() { + for (auto* ash_host : mirroring_hosts_) + ash_host->AsWindowTreeHost()->window()->RemoveObserver(this); + DestroyCompositor(); DestroyDispatcher(); } diff --git a/ash/magnifier/magnification_controller_unittest.cc b/ash/magnifier/magnification_controller_unittest.cc index 596884d2254a7..897368ebe2e53 100644 --- a/ash/magnifier/magnification_controller_unittest.cc +++ b/ash/magnifier/magnification_controller_unittest.cc @@ -4,9 +4,9 @@ #include "ash/magnifier/magnification_controller.h" -#include "ash/display/display_manager.h" #include "ash/shell.h" #include "ash/test/ash_test_base.h" +#include "ash/test/display_manager_test_api.h" #include "base/strings/stringprintf.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/env.h" @@ -587,10 +587,7 @@ TEST_F(MagnificationControllerTest, FollowTextInputFieldKeyPress) { TEST_F(MagnificationControllerTest, EnableMagnifierInUnifiedDesktop) { if (!SupportsMultipleDisplays()) return; - - DisplayManager* display_manager = Shell::GetInstance()->display_manager(); - display_manager->SetDefaultMultiDisplayMode(DisplayManager::UNIFIED); - display_manager->SetMultiDisplayMode(DisplayManager::UNIFIED); + test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); EXPECT_EQ(1.0f, GetMagnificationController()->GetScale()); diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc index e5e47aeb2a71e..b6378f4903e5c 100644 --- a/ash/root_window_controller_unittest.cc +++ b/ash/root_window_controller_unittest.cc @@ -11,6 +11,7 @@ #include "ash/shell_window_ids.h" #include "ash/system/tray/system_tray_delegate.h" #include "ash/test/ash_test_base.h" +#include "ash/test/display_manager_test_api.h" #include "ash/wm/system_modal_container_layout_manager.h" #include "ash/wm/window_properties.h" #include "ash/wm/window_state.h" @@ -294,9 +295,8 @@ TEST_F(RootWindowControllerTest, MoveWindows_Modal) { TEST_F(RootWindowControllerTest, MoveWindows_LockWindowsInUnified) { if (!SupportsMultipleDisplays()) return; - DisplayManager* display_manager = Shell::GetInstance()->display_manager(); - display_manager->SetDefaultMultiDisplayMode(DisplayManager::UNIFIED); - display_manager->SetMultiDisplayMode(DisplayManager::UNIFIED); + test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); + UpdateDisplay("500x500"); const int kLockScreenWindowId = 1000; const int kLockBackgroundWindowId = 1001; @@ -337,6 +337,7 @@ TEST_F(RootWindowControllerTest, MoveWindows_LockWindowsInUnified) { EXPECT_EQ("0,0 500x500", lock_screen->GetNativeWindow()->bounds().ToString()); // Switch to mirror. + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); display_manager->SetMirrorMode(true); EXPECT_TRUE(display_manager->IsInMirrorMode()); diff --git a/ash/rotator/screen_rotation_animator.cc b/ash/rotator/screen_rotation_animator.cc index 742ade963d947..9b746b6821a04 100644 --- a/ash/rotator/screen_rotation_animator.cc +++ b/ash/rotator/screen_rotation_animator.cc @@ -12,7 +12,6 @@ #include "ash/display/display_info.h" #include "ash/display/display_manager.h" #include "ash/rotator/screen_rotation_animation.h" -#include "ash/session/session_state_delegate.h" #include "ash/shell.h" #include "base/command_line.h" #include "base/time/time.h" @@ -281,19 +280,10 @@ ScreenRotationAnimator::~ScreenRotationAnimator() { } bool ScreenRotationAnimator::CanAnimate() const { - // Animations are currently broken on the login screen. - // (chrome-os-partners:40118). Disabling the animations on this screen for - // M-43 return Shell::GetInstance() - ->display_manager() - ->GetDisplayForId(display_id_) - .is_valid() && - Shell::GetInstance() - ->session_state_delegate() - ->IsActiveUserSessionStarted() && - !Shell::GetInstance()->session_state_delegate()->IsScreenLocked() && - Shell::GetInstance()->session_state_delegate()->GetSessionState() == - SessionStateDelegate::SESSION_STATE_ACTIVE; + ->display_manager() + ->GetDisplayForId(display_id_) + .is_valid(); } void ScreenRotationAnimator::Rotate(gfx::Display::Rotation new_rotation, diff --git a/ash/screen_util_unittest.cc b/ash/screen_util_unittest.cc index 6e74390703d48..7fc9ae6314684 100644 --- a/ash/screen_util_unittest.cc +++ b/ash/screen_util_unittest.cc @@ -10,6 +10,7 @@ #include "ash/shelf/shelf_widget.h" #include "ash/shell.h" #include "ash/test/ash_test_base.h" +#include "ash/test/display_manager_test_api.h" #include "ash/wm/window_util.h" #include "ui/aura/env.h" #include "ui/aura/window.h" @@ -116,6 +117,8 @@ TEST_F(ScreenUtilTest, ConvertRect) { TEST_F(ScreenUtilTest, ShelfDisplayBoundsInUnifiedDesktop) { if (!SupportsMultipleDisplays()) return; + test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); + DisplayManager* display_manager = Shell::GetInstance()->display_manager(); display_manager->SetDefaultMultiDisplayMode(DisplayManager::UNIFIED); display_manager->SetMultiDisplayMode(DisplayManager::UNIFIED); diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc index e09f5fd15c728..b737e80e136a1 100644 --- a/ash/shelf/shelf_layout_manager_unittest.cc +++ b/ash/shelf/shelf_layout_manager_unittest.cc @@ -22,6 +22,7 @@ #include "ash/system/tray/system_tray.h" #include "ash/system/tray/system_tray_item.h" #include "ash/test/ash_test_base.h" +#include "ash/test/display_manager_test_api.h" #include "ash/test/shelf_test_api.h" #include "ash/wm/window_state.h" #include "ash/wm/window_util.h" @@ -2342,10 +2343,8 @@ TEST_F(ShelfLayoutManagerTest, ShutdownHandlesWindowActivation) { TEST_F(ShelfLayoutManagerTest, ShelfLayoutInUnifiedDesktop) { if (!SupportsMultipleDisplays()) return; + test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); - DisplayManager* display_manager = Shell::GetInstance()->display_manager(); - display_manager->SetDefaultMultiDisplayMode(DisplayManager::UNIFIED); - display_manager->SetMultiDisplayMode(DisplayManager::UNIFIED); UpdateDisplay("500x500, 500x500"); StatusAreaWidget* status_area_widget = diff --git a/ash/shell.cc b/ash/shell.cc index d7dc9b5623fa2..1a96264756a2b 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -486,11 +486,9 @@ void Shell::RemoveShellObserver(ShellObserver* observer) { #if defined(OS_CHROMEOS) bool Shell::ShouldSaveDisplaySettings() { - // TODO(oshima): Allow saving the settings even in unified desktop mode. return !(screen_orientation_controller_ ->ignore_display_configuration_updates() || - resolution_notification_controller_->DoesNotificationTimeout()) && - !switches::UnifiedDesktopEnabled(); + resolution_notification_controller_->DoesNotificationTimeout()); } #endif diff --git a/ash/strings/ash_strings_am.xtb b/ash/strings/ash_strings_am.xtb index 958fc3dca25bf..618c5a6154efa 100644 --- a/ash/strings/ash_strings_am.xtb +++ b/ash/strings/ash_strings_am.xtb @@ -72,6 +72,7 @@ CAPS LOCK በርቷል የውስጥ ማሳያ ቅንብሮችዎ ከተመሳሰሉ በኋላ ቋንቋው ከ« ወደ «» ተቀይሯል። +በመውሰድ ላይ $1 የብሬይል ማሳያ ተገናኝቷል። Wi-Fi አብራ... የማያ ገጽዎን ቁጥጥር በርቀት እርዳታ በኩል ለ በማጋራት ላይ። @@ -96,9 +97,11 @@ % ይቀራል የግቤት ስልቶች ክፍለ-ጊዜ በ ውስጥ ያበቃል። ዘግተው እንዲወጡ ይደረጋሉ። +ዴስክቶፕ ውሰድ ወደ % ድምጽ ማጉያ (ውስጣዊ) በማያ ገጽ ላይ የቁልፍ ሰሌዳ ነቅቷል +የተዋሃደ የዴስክቶፕ ሁነታ መደርደሪያ የእርስዎ Chromebook በርቶ ሳለ ባትሪ ላይሞላ ይችላል። ዋናውን ባትሪ መሙያ መጠቀሙን ያስቡበት። ድምፅ @@ -124,6 +127,7 @@ የብሉቱዝ መሣሪያ «» ለመጣመር ፍቃድ ይፈልጋል። Wi-Fi ራስ-ሰር ጠቅታዎች +ምንም የሚወሰዱ መሣሪያዎች የሉም ፦ በመገናኘት ላይ... ውስጥ በራስ-ሰር ዘግተው እንዲወጡ ይደረጋሉ። ያልታወቀ ማሳያ @@ -206,6 +210,7 @@ ውጽዓት ማስጀመሪያ (መተግበሪያዎችን በማመሳሰል ላይ...) ሌላ ይቀላቀሉ... +ዴስክቶፕ በመውሰድ ላይ ሙሉ እስኪሆን ድረስ shift diff --git a/ash/strings/ash_strings_ar.xtb b/ash/strings/ash_strings_ar.xtb index ed31cc150aada..fbfb21b70185d 100644 --- a/ash/strings/ash_strings_ar.xtb +++ b/ash/strings/ash_strings_ar.xtb @@ -72,6 +72,7 @@ ‏مفتاح CAPS LOCK قيد التشغيل العرض الداخلي تم تغيير اللغة من "" إلى "" بعد مزامنة إعداداتك. +يتم الآن إرسال $1 تم توصيل شاشة برايل. ‏تشغيل شبكة Wi-Fi... مشاركة التحكم في شاشتك مع عن طريق المساعدة عن بُعد. @@ -96,9 +97,11 @@ باقٍ % أساليب الإدخال تنتهي الجلسة في . وسيتم إخراجك. +إرسال سطح المكتب إلى % سماعة (داخلية) تم تمكين لوحة المفاتيح على الشاشة +وضع سطح المكتب الموحد الرف ‏قد لا يستجيب جهاز Chromebook لعملية الشحن وهو قيد التشغيل. مع مراعاة استخدام الشاحن المخصص للجهاز. مستوى الصوت @@ -124,6 +127,7 @@ يريد جهاز بلوتوث "" الحصول على إذن للإقران. ‏لاسلكي، Wi-Fi النقرات التلقائية +لا توجد أجهزة بث : جارٍ التوصيل... سيتم تسجيل خروجك تلقائيًا في غضون . شاشة عرض غير معروفة @@ -203,6 +207,7 @@ الإخراج ‏Launcher (مزامنة التطبيقات...) الانضمام إلى شبكة أخرى... +يتم الآن إرسال سطح المكتب : س د حتى الاكتمال shift diff --git a/ash/strings/ash_strings_bg.xtb b/ash/strings/ash_strings_bg.xtb index b6db75b69c867..1b5611d9ec93d 100644 --- a/ash/strings/ash_strings_bg.xtb +++ b/ash/strings/ash_strings_bg.xtb @@ -72,6 +72,7 @@ „CAPS LOCK“ е включен Показване на вътрешна информация Езикът се промени от „“ на „“ след синхронизирането на настройките ви. +Предава се $1 Брайловият дисплей е свързан. Включване на Wi-Fi... Споделяте с/ъс контрола върху екрана си чрез отдалечено съдействие. @@ -96,15 +97,18 @@ Остава/т % Методи за въвеждане Сесията приключва след . Ще излезете от профила. +Предаване на работния плот към % Високоговорител (вътрешен) Екранната клавиатура е активирана +Режим на обединен работен плот Лавица Възможно е вашият Chromebook да не се зарежда, докато е включен. Помислете за използване на официалното зарядно устройство. Звук Всички налични потребители вече са добавени към тази сесия. Търсене Информация за мрежата +Отключване на завъртането Оставащо време до изразходването на батерията: Изход от сесията като гост Предишно меню @@ -112,6 +116,7 @@ Екранните снимки са деактивирани Надясно Мобилни мрежи... +Заключване на завъртането Настройки Приложенията се синхронизират... Профили @@ -122,6 +127,7 @@ Устройството с Bluetooth „“ иска разрешение за сдвояване. Wi-Fi Автоматични кликвания +Няма устройства Cast : Установява се връзка... Ще излезете автоматично след . Неизвестен дисплей @@ -131,6 +137,7 @@ Област за състоянието, часът е , Заключване Приложения +Новият потребителски интерфейс за вход е ИЗКЛЮЧЕН Изключване Управление на профилите Камерата се използва. @@ -149,6 +156,7 @@ Слушалки Сканира се за устройства... , +Новият потребителски интерфейс за вход е ВКЛЮЧЕН Споделяте контрола върху екрана си чрез отдалечено съдействие. Микрофон (вътрешен) Възникна грешка @@ -202,6 +210,7 @@ Изход Стартов панел (приложенията се синхронизират...) Присъединяване другаде... +Предава се работният плот : ч м до пълно зареждане shift diff --git a/ash/strings/ash_strings_bn.xtb b/ash/strings/ash_strings_bn.xtb index cc4fb3118051d..38a4b75f95193 100644 --- a/ash/strings/ash_strings_bn.xtb +++ b/ash/strings/ash_strings_bn.xtb @@ -72,6 +72,7 @@ CAPS LOCK চালু অভ্যন্তরীণ প্রদর্শন আপনার সেটিংস সিঙ্ক করার পরে ভাষা "" থেকে "" এ পরিবর্তন করা হয়েছে৷ +$1 কাস্ট করা হচ্ছে ব্রেইল প্রদর্শন সংযুক্ত হয়েছে৷ Wi-Fi চালু করুন... রিমোট সহায়কের মাধ্যমে -এর সাথে আপনার স্ক্রীন নিয়ন্ত্রন ভাগ করুন৷ @@ -96,15 +97,18 @@ % বাকি আছে ইনপুট পদ্ধতিসমূহ এর মধ্যে সেশন শেষ হয়ে যাবে৷ আপনাকে সাইন আউট করা হবে৷ +এতে ডেস্কটপ কাস্ট করুন % স্পিকার (অভ্যন্তরীণ) অন-স্ক্রীন কীবোর্ড সক্ষম করা রয়েছে +একীভূত ডেস্কটপ মোড শেল্ফ চালু থাকার সময় আপনার Chromebook চার্জ নাও হতে পারে৷ এটির নিজস্ব চার্জার ব্যবহার করার কথা বিবেচনা করুন৷ ভলিউম সমস্ত উপলব্ধ ব্যবহারকারীকে ইতিমধ্যেই এই সেশনে যোগ করা হয়েছে৷ অনুসন্ধান নেটওয়ার্ক তথ্য +আবর্তন লক অক্ষম করুন ব্যাটারি শেষ হতে সময় বাকি আছে অতিথি থেকে প্রস্থান পূর্ববর্তী মেনু @@ -112,6 +116,7 @@ স্ক্রীনশট অক্ষম হয়েছে ডান মোবাইল ... +আবর্তন লক সক্ষম করুন সেটিংস অ্যাপ্লিকেশনগুলি সিঙ্ক হচ্ছে... অ্যাকাউন্টসমূহ @@ -122,6 +127,7 @@ Bluetooth ডিভাইস "" যুক্ত করার অনুমতি চাইছে। Wi-Fi স্বয়ংক্রিয় ক্লিকগুলি +কোনো কাস্ট ডিভাইস নেই : সংযুক্ত হচ্ছে... আপনি এর মধ্যে স্বয়ংক্রিয়ভাবে সাইন আউট হবেন৷ অজানা প্রদর্শন @@ -131,6 +137,7 @@ স্থিতি ট্রে, সময় , লক করুন অ্যাপ্স +নতুন লগইন UI বন্ধ আছে বন্ধ করুন অ্যাকাউন্টগুলি পরিচালনা করুন ক্যামেরা ব্যবহার করা হচ্ছে। @@ -149,6 +156,7 @@ হেডফোন ডিভাইসগুলির জন্য স্ক্যান করা হচ্ছে... , +নতুন লগইন UI চালু আছে রিমোট সহায়কের মাধ্যমে আপনার স্ক্রীন নিয়ন্ত্রণ ভাগ করুন৷ মাইক্রোফোন (অভ্যন্তরীণ) একটি ত্রুটি ঘটেছে @@ -180,7 +188,7 @@ CAPS LOCK চালু আছে৷ Search অথবা বাতিল করতে Shift টিপুন৷ গণনা করা হচ্ছে... -Bluetooth ডিভাইস "" যুক্ত করার অনুমতি চাইছে। দয়া করে ডিভাইসটিতে এই PIN কোড প্রবেশ করুন: +Bluetooth ডিভাইস "" যুক্ত করার অনুমতি চাইছে। দয়া করে ডিভাইসটিতে এই পিন কোড প্রবেশ করুন: আপনি এখনই সাইন আউট হবেন৷ মোবাইল ডেটা সেটআপ করুন আরো জানুন @@ -201,6 +209,7 @@ Alt+Search অথবা বাতিল করতে Shift টিপুন৷আউটপুট লঞ্চার (অ্যাপ সিঙ্ক করা হচ্ছে...) অন্যান্য যোগদান ... +ডেস্কটপ কাস্ট করা হচ্ছে : ঘন্টা মিনিট পর্যন্ত পূর্ণ shift diff --git a/ash/strings/ash_strings_ca.xtb b/ash/strings/ash_strings_ca.xtb index 01d65848cecea..f2ad6f02cb57a 100644 --- a/ash/strings/ash_strings_ca.xtb +++ b/ash/strings/ash_strings_ca.xtb @@ -72,6 +72,7 @@ Premeu Maj+Alt per canviar-lo. BLOQ MAJ està activat. Pantalla interna L'idioma ha canviat de "" a "" després de sincronitzar la vostra configuració. +S'està emetent $1 S'ha connectat la pantalla Braille. Activa la Wi-Fi... Es comparteix el control de la pantalla amb mitjançant l'Assistència remota. @@ -96,15 +97,18 @@ Premeu Maj+Alt per canviar-lo. Queda un % Mètodes d'introducció La sessió finalitzarà d'aquí a i es tancarà. +Emet l'escriptori a % Altaveu (intern) Teclat en pantalla activat +Mode d'escriptori unificat Prestatge És possible que el vostre Chromebook no es carregui mentre estigui encès. Proveu de fer servir un carregador oficial. Volum Ja s'han afegit tots els usuaris disponibles a aquesta sessió. Cerca Informació de la xarxa +Desactiveu el bloqueig de la rotació Temps que queda fins que no s'esgoti la bateria: Surt de la sessió de convidat Menú anterior @@ -112,6 +116,7 @@ Premeu Maj+Alt per canviar-lo. Captures de pantalla desactivades A la dreta Xarxes mòbils... +Activeu el bloqueig de la rotació Configuració S'estan sincronitzant les aplicacions... Comptes @@ -122,6 +127,7 @@ Premeu Maj+Alt per canviar-lo. El dispositiu Bluetooth "" sol·licita permís per emparellar-se. Wi-Fi Clics automàtics +No hi ha dispositius d'emissió : s'està connectant... Es tancarà la sessió automàticament d'aquí a . Pantalla desconeguda @@ -131,6 +137,7 @@ Premeu Maj+Alt per canviar-lo. Safata d'estat. Hora: , Bloqueja Aplicacions +La nova IU d'inici de sessió està desactivada Apaga Gestiona els comptes La càmera s'està utilitzant. @@ -149,6 +156,7 @@ Premeu Maj+Alt per canviar-lo. Auricular S'estan cercant dispositius... , +La nova IU d'inici de sessió està activada Es comparteix el control de la pantalla mitjançant l'Assistència remota. Micròfon (intern) S'ha produït un error @@ -202,6 +210,7 @@ Premeu Alt+Cerca o Maj per cancel·lar. Sortida Launcher (s'estan sincronitzant les aplicacions...) Connecta't a una altra xarxa... +S'està emetent l'escriptori : Falten h min fins que estigui carregada completament maj diff --git a/ash/strings/ash_strings_cs.xtb b/ash/strings/ash_strings_cs.xtb index 7fdc91cd659da..c8e0ace08e406 100644 --- a/ash/strings/ash_strings_cs.xtb +++ b/ash/strings/ash_strings_cs.xtb @@ -18,7 +18,7 @@ Povolit Wi-Fi Jas Vstup -Klávesnice na obrazovce +Softwarová klávesnice Sledování výkonu aktivováno Výpočet doby výdrže baterie. Síť @@ -71,6 +71,7 @@ CAPS LOCK je zapnutý Interní displej Jazyk prohlížeče Chrome se po synchronizaci nastavení změnil z jazyka na jazyk . +Odesílání karty $1 Je připojen hmatový displej. Zapnout Wi-Fi... Ovládání obrazovky je prostřednictvím Vzdálené pomoci sdíleno s uživatelem . @@ -94,9 +95,11 @@ Zbývá  % Metody zadávání dat Relace skončí za . Poté budete odhlášeni. +Odeslat plochu do % Reproduktor (interní) Softwarová klávesnice je aktivována +Jednotný režim klasické plochy Polička Když bude Chromebook zapnutý, možná se nebude nabíjet. Doporučujeme použít oficiální nabíječku. Hlasitost @@ -122,6 +125,7 @@ Zařízení Bluetooth „“ žádá o povolení ke spárování. Wi-Fi Automatická kliknutí +Nejsou k dispozici žádná zařízení Cast : Připojování... Za budete automaticky odhlášeni. Neznámý displej @@ -163,7 +167,7 @@ Baterie je nabita na %. Nastavení... Odmítnout -Povolit klávesnici na obrazovce +Povolit softwarovou klávesnici přesah obrazu Váš počítač mohou objevit okolní zařízení Bluetooth, ve kterých se bude zobrazovat s názvem „“ a adresou . Automaticky skrývat poličku @@ -175,7 +179,7 @@ Práci ukončíte dvojitým stisknutím kombinace kláves Ctrl+Shift+Q. Baterie je nabita na % a nabíjí se. Baterie je plně nabita. -Zobrazit klávesnici na obrazovce +Zobrazit softwarovou klávesnici Vrátit zpět Vyhledávání nebo Shift Nápověda @@ -184,7 +188,7 @@ Zařízení Bluetooth „“ žádá o povolení ke spárování. Zadejte prosím v zařízení tento kód PIN: Nyní budete odhlášeni. Nastavit mobilní datové připojení -Další informace +Další informace Původní rozlišení bude obnoveno za Kamera a mikrofon jsou používány. Možnosti @@ -203,6 +207,7 @@ Vypnete jej stisknutím kombinace kláves Alt + Vyhledávání nebo Shift.Výstup Spouštěč (synchronizace aplikací...) Připojit k jiné... +Odesílání plochy : h min do nabití shift diff --git a/ash/strings/ash_strings_da.xtb b/ash/strings/ash_strings_da.xtb index be9c509c1a8cf..d804dc147989e 100644 --- a/ash/strings/ash_strings_da.xtb +++ b/ash/strings/ash_strings_da.xtb @@ -72,6 +72,7 @@ Tryk på Shift+Alt for at ændre den. CAPS LOCK er slået til Intern skærm Sproget er blevet ændret fra "" til "", efter at du har synkroniseret dine indstillinger. +Caster $1 Der er tilsluttet en brailleskærm. Slå Wi-Fi til... Skærmdeling med via Fjernsupport. @@ -96,15 +97,18 @@ Tryk på Shift+Alt for at ændre den. % tilbage Indtastningsmetoder Sessionen slutter om . Du vil blive logget af. +Cast skrivebord til % Højttaler (indbygget) Skærmtastaturet er aktiveret +Samlet skrivebordstilstand Hylde Din Chromebook oplades muligvis ikke, når den er tændt. Anvend eventuelt den officielle oplader. Lydstyrke Alle tilgængelige brugere er allerede blevet føjet til denne session. Søg Netværksoplysninger +Deaktiver låsning af rotation Tid tilbage, indtil batteriet er tomt, Afslut gæstesession Forrige menu @@ -112,6 +116,7 @@ Tryk på Shift+Alt for at ændre den. Skærmbilleder er deaktiveret Højre Mobil... +Aktivér låsning af rotation Indstillinger Synkroniserer apps... Konti @@ -122,6 +127,7 @@ Tryk på Shift+Alt for at ændre den. Bluetooth-enheden "" vil gerne have parringstilladelse. Wi-Fi Automatiske klik +Ingen Cast-enheder : Opretter forbindelse... Du bliver automatisk logget ud om . Ukendt skærm @@ -131,6 +137,7 @@ Tryk på Shift+Alt for at ændre den. Statusbakke, tid , Lås Apps +Ny brugergrænseflade for login er slået FRA Sluk Administrer konti Kameraet er i brug. @@ -149,6 +156,7 @@ Tryk på Shift+Alt for at ændre den. Hovedtelefon Scanner efter enheder... d. +Ny brugergrænseflade for login er slået TIL Skærmdeling via Fjernsupport. Mikrofon (indbygget) Der opstod en fejl @@ -202,6 +210,7 @@ Tryk på Alt+Søg eller Shift for at annullere. Output Starter (synkronisering af apps...) Vælg et andet... +Caster skrivebord : t m, indtil det er fuldt opladet shift diff --git a/ash/strings/ash_strings_de.xtb b/ash/strings/ash_strings_de.xtb index b214f9c0adef3..72726536417be 100644 --- a/ash/strings/ash_strings_de.xtb +++ b/ash/strings/ash_strings_de.xtb @@ -72,6 +72,7 @@ Drücken Sie zum Wechseln Shift+Alt. Feststelltaste An Interne Anzeige Nach der Synchronisierung Ihrer Einstellungen wurde die Sprache von "" in "" geändert. +Übertragung $1 Verbindung zur Braillezeile hergestellt WLAN aktivieren... Sie teilen sich die Bildschirmsteuerung mit per Remote-Unterstützung. @@ -96,15 +97,18 @@ Drücken Sie zum Wechseln Shift+Alt. % verbleibend Eingabemethoden Sitzung endet in . Sie werden dann abgemeldet. +Desktop übertragen nach % Lautsprecher (intern) Bildschirmtastatur aktiviert +Unified Desktop-Modus Ablage Ihr Chromebook kann möglicherweise nicht geladen werden, während es eingeschaltet ist. Wir empfehlen die Verwendung des Originalladegeräts. Lautstärke Alle verfügbaren Nutzer wurden bereits zur Sitzung hinzugefügt. Suchen Netzwerkinformationen +Rotationssperre deaktivieren Verbleibende Akku-Laufzeit: Gastsitzung beenden Vorheriges Menü @@ -112,6 +116,7 @@ Drücken Sie zum Wechseln Shift+Alt. Screenshot-Funktion deaktiviert Rechts Mobil... +Rotationssperre aktivieren Einstellungen Apps werden synchronisiert... Konten @@ -122,6 +127,7 @@ Drücken Sie zum Wechseln Shift+Alt. Das Bluetooth-Gerät "" bittet um Erlaubnis für das Pairing. WLAN Automatische Klicks +Keine Übertragungsgeräte : Verbindung wird hergestellt... Sie werden in automatisch abgemeldet. Display unbekannt @@ -131,6 +137,7 @@ Drücken Sie zum Wechseln Shift+Alt. Statusleiste, Uhrzeit , Sperren Apps +Die neue Benutzeroberfläche für die Anmeldung ist deaktiviert. Herunterfahren Konten verwalten Kamera wird verwendet. @@ -149,6 +156,7 @@ Drücken Sie zum Wechseln Shift+Alt. Kopfhörer Nach Geräten wird gesucht... , +Die neue Benutzeroberfläche für die Anmeldung ist aktiviert. Sie teilen sich die Bildschirmsteuerung per Remote-Unterstützung. Mikrofon (intern) Ein Fehler ist aufgetreten. @@ -202,6 +210,7 @@ Drücken Sie Alt+Suchen oder Shift, um die Aktivierung aufzuheben. Ausgang Launcher (Apps werden synchronisiert...) Andere Netzwerke... +Desktop wird übertragen : In Std. Min. vollständig aufgeladen Shift diff --git a/ash/strings/ash_strings_el.xtb b/ash/strings/ash_strings_el.xtb index f3893dcca6394..724d677cf2ada 100644 --- a/ash/strings/ash_strings_el.xtb +++ b/ash/strings/ash_strings_el.xtb @@ -72,6 +72,7 @@ Το CAPS LOCK είναι ενεργοποιημένο Εσωτερική οθόνη Η γλώσσα του άλλαξε από "" σε "" μετά τον συγχρονισμό των ρυθμίσεών σας. +Μετάδοση $1 Συνδέθηκε η οθόνη Braille. Ενεργοποίηση Wi-Fi… Κοινόχρηστος έλεγχος της οθόνης σας με το χρήστη μέσω της απομακρυσμένης βοήθειας. @@ -96,15 +97,18 @@ Υπολείπεται % Μέθοδοι εισαγωγής Η περίοδος σύνδεσης λήγει σε . Θα αποσυνδεθείτε. +Μετάδοση επιφάνειας εργασίας σε % Ηχείο (Εσωτερικό) Το πληκτρολόγιο οθόνης είναι ενεργοποιημένο +Ενιαία λειτουργία επιφάνειας εργασίας. Ράφι Το Chromebook ενδέχεται να μη φορτίζει ενώ είναι ενεργοποιημένο. Χρησιμοποιήστε τον αυθεντικό φορτιστή. Ένταση Όλοι οι διαθέσιμοι χρήστες έχουν ήδη προστεθεί σε αυτήν την περίοδο σύνδεσης. Αναζήτηση Πληροφορίες δικτύου +Απενεργοποίηση κλειδώματος περιστροφής Χρόνος που απομένει μέχρι να αδειάσει η μπαταρία, Έξοδος επισκέπτη Προηγούμενο μενού @@ -112,6 +116,7 @@ Τα στιγμιότυπα οθόνης απενεργοποιήθηκαν Δεξιά Κινητή τηλεφωνία... +Ενεργοποίηση κλειδώματος περιστροφής Ρυθμίσεις Συγχρονισμός εφαρμογών… Λογαριασμοί @@ -122,6 +127,7 @@ Η συσκευή Bluetooth "" ζητά δικαιώματα σύζευξης. Wi-Fi Αυτόματα κλικ +Δεν υπάρχουν συσκευές για μετάδοση : Σύνδεση… Θα αποσυνδεθείτε αυτόματα σε . Άγνωστη οθόνη @@ -131,6 +137,7 @@ Δίσκος κατάστασης, ώρα , Κλείδωμα Εφαρμογές +Το περιβάλλον χρήσης νέας σύνδεσης είναι απενεργοποιημένο Τερματισμός λειτουργίας Διαχείριση λογαριασμών Η κάμερα δεν χρησιμοποιείται. @@ -149,6 +156,7 @@ Ακουστικά Σάρωση για συσκευές… , +Το περιβάλλον χρήσης νέας σύνδεσης είναι ενεργοποιημένο Κοινόχρηστος έλεγχος της οθόνης σας μέσω της απομακρυσμένης βοήθειας. Μικρόφωνο (Εσωτερικό) Παρουσιάστηκε σφάλμα @@ -202,6 +210,7 @@ Έξοδος Εφαρμογή εκκίνησης (συγχρονισμός εφαρμογών…) Συμμετοχή σε άλλο… +Μετάδοση επιφάνειας εργασίας : ω λ μέχρι να ολοκληρωθεί η φόρτιση shift diff --git a/ash/strings/ash_strings_en-GB.xtb b/ash/strings/ash_strings_en-GB.xtb index ff4ff1e839e86..2177a0734e561 100644 --- a/ash/strings/ash_strings_en-GB.xtb +++ b/ash/strings/ash_strings_en-GB.xtb @@ -72,6 +72,7 @@ Press Shift + Alt to switch. CAPS LOCK is on Internal Display The language has changed from "" to "" after syncing your settings. +Casting $1 Braille display connected. Turn Wi-Fi on... Sharing control of your screen with via Remote Assistance. @@ -96,9 +97,11 @@ Press Shift + Alt to switch. % remaining Input methods Session ends in . You will be signed out. +Cast desktop to % Speaker (Internal) On-screen keyboard enabled +Unified desktop mode Shelf Your Chromebook may not charge while it is turned on. Consider using the official charger. volume @@ -124,6 +127,7 @@ Press Shift + Alt to switch. Bluetooth device "" would like permission to pair. Wi-Fi Automatic clicks +No cast devices : Connecting... You will automatically be signed out in . Unknown Display @@ -206,6 +210,7 @@ Press Alt+Search or Shift to cancel. Output Launcher (syncing apps...) Join other ... +Casting desktop : h m until full shift diff --git a/ash/strings/ash_strings_es-419.xtb b/ash/strings/ash_strings_es-419.xtb index 1aded07c069d3..ce62e7591a2d6 100644 --- a/ash/strings/ash_strings_es-419.xtb +++ b/ash/strings/ash_strings_es-419.xtb @@ -72,6 +72,7 @@ Para cambiarlo, presiona Shift + Alt. BLOQ MAYÚS está activado. Pantalla interna Después de sincronizar tu configuración, el idioma se cambió de "" a "". +Transmitiendo $1 Dispositivo braille conectado Encender Wi-Fi... Se está compartiendo el control de la pantalla con mediante la Asistencia remota. @@ -96,9 +97,11 @@ Para cambiarlo, presiona Shift + Alt. % restante Métodos de entrada La sesión terminará en y se cerrará. +Transmitir escritorio a % Altavoz (interno) Teclado en pantalla habilitado +Modo de escritorio unificado Biblioteca Es posible que tu Chromebook no se cargue mientras esté encendida. Te recomendamos que utilices el cargador oficial. Volumen @@ -124,6 +127,7 @@ Para cambiarlo, presiona Shift + Alt. El dispositivo Bluetooth "" solicita permiso para sincronizarse. Wi-Fi Clics automáticos +No hay dispositivos de transmisión. : Conectando... Saldrás de la sesión automáticamente en . Pantalla desconocida @@ -205,6 +209,7 @@ Presiona Alt y la tecla de búsqueda o Mayús para cancelar la operación.Salida Selector (sincronizando aplicaciones…) Conectarte a otra red... +Transmitiendo el escritorio : h min para completar la carga shift diff --git a/ash/strings/ash_strings_es.xtb b/ash/strings/ash_strings_es.xtb index db0a2a29f9b5a..d97939aa0fd2c 100644 --- a/ash/strings/ash_strings_es.xtb +++ b/ash/strings/ash_strings_es.xtb @@ -72,6 +72,7 @@ Para cambiarlo, pulsa Mayús + Alt. Bloqueo de mayúsculas activado Pantalla interna El idioma ha cambiado de "" a "" después de sincronizar tu configuración. +Enviando $1 La pantalla braille está conectada. Activar Wi-Fi... Compartiendo control de la pantalla con a través de Asistencia remota. @@ -96,15 +97,18 @@ Para cambiarlo, pulsa Mayús + Alt. % restante Métodos de entrada La sesión finalizará dentro de . Se cerrará tu sesión. +Enviar escritorio a % Altavoz (interno) Teclado en pantalla habilitado +Modo de escritorio unificado Estantería Es posible que tu Chromebook no se cargue mientras esté activado. Te recomendamos que utilices el cargador oficial. Volumen Todos los usuarios disponibles ya se han añadido a esta sesión. Buscar Información de red +Inhabilitar bloqueo de rotación Tiempo restante hasta que se agote la batería: Salir de la sesión de invitado Menú anterior @@ -112,6 +116,7 @@ Para cambiarlo, pulsa Mayús + Alt. Capturas de pantalla inhabilitadas Derecha Redes móviles... +Habilitar bloqueo de rotación Configuración Sincronizando aplicaciones... Cuentas @@ -122,6 +127,7 @@ Para cambiarlo, pulsa Mayús + Alt. El dispositivo Bluetooth "" solicita permiso para vincularse. Wi-Fi Clics automáticos +No hay dispositivos de transmisión : conectando... Tu sesión se cerrará automáticamente en . Pantalla desconocida @@ -131,6 +137,7 @@ Para cambiarlo, pulsa Mayús + Alt. Bandeja de estado, hora , Bloquear Aplicaciones +La nueva interfaz de usuario de inicio de sesión está DESACTIVADA Apagar Administrar cuentas La cámara se está utilizando. @@ -149,6 +156,7 @@ Para cambiarlo, pulsa Mayús + Alt. Auriculares Buscando dispositivos... , +La nueva interfaz de usuario de inicio de sesión está ACTIVADA Compartiendo control de la pantalla a través de Asistencia remota. Micrófono (interno) Se ha producido un error. @@ -202,6 +210,7 @@ Pulsa Alt y la tecla de búsqueda o Mayús para cancelar la operación.Salida Menú de aplicaciones (sincronizando aplicaciones...) Conectarse a otra red... +Enviando escritorio : h y min para completar la carga mayús diff --git a/ash/strings/ash_strings_et.xtb b/ash/strings/ash_strings_et.xtb index 2def1fc476d74..4135fbe3419a4 100644 --- a/ash/strings/ash_strings_et.xtb +++ b/ash/strings/ash_strings_et.xtb @@ -72,6 +72,7 @@ Selle muutmiseks vajutage klahve Tõstuklahv + Alt. SUURTÄHELUKK on sisse lülitatud Sisemine kuva Pärast seadete sünkroonimist asendati keel keelega. +Ülekandmine: $1 Punktkirja ekraanikuva on ühendatud. Lülita WiFi sisse ... Ekraani juhtimise jagamine isikuga kaugabi kaudu. @@ -96,15 +97,18 @@ Selle muutmiseks vajutage klahve Tõstuklahv + Alt. % on jäänud Sisestusviisid Seansi lõpuni on jäänud . Teid logitakse välja. +Kanna töölaud üle asukohta % Kõlar (sisemine) Ekraanil kuvatav klaviatuur on lubatud +Ühendatud töölaua režiim Riiul Teie Chromebooki ei pruugita laadida, kui see on sisse lülitatud. Kaaluge ametliku laadija kasutamist. Helitugevus Kõik saadaval kasutajad on sellesse seanssi juba lisatud. Otsi Võrguteave +Keela pööramise lukustus Aku tühjenemiseni on aega Välju külastajaseansist Eelmine menüü @@ -112,6 +116,7 @@ Selle muutmiseks vajutage klahve Tõstuklahv + Alt. Ekraanipildid on keelatud Paremale Mobiil ... +Luba pööramise lukustus Seadistused Rakenduste sünkroonimine ... Kontod @@ -122,6 +127,7 @@ Selle muutmiseks vajutage klahve Tõstuklahv + Alt. Bluetoothi seade „” küsib luba sidumiseks. WiFi Automaatsed klikid +Ülekandeseadmeid pole : ühendamine ... Teid logitakse automaatselt välja pärast. Tundmatu ekraan @@ -131,6 +137,7 @@ Selle muutmiseks vajutage klahve Tõstuklahv + Alt. Olekusalv, kellaaeg , Lukusta Rakendused +Uus sisselogimise kasutajaliides on VÄLJAS Lülita välja Halda kontosid Kaamera on kasutusel. @@ -149,6 +156,7 @@ Selle muutmiseks vajutage klahve Tõstuklahv + Alt. Kõrvaklapid Seadmete skannimine ... , +Uus sisselogimise kasutajaliides on SEES Ekraani juhtimise jagamine kaugabi kaudu. Mikrofon (sisemine) Tekkis viga @@ -202,6 +210,7 @@ Tühistamiseks vajutage klahvikombinatsiooni Alt + otsinguklahv või tõstuklahv Väljund Käivitusprogramm (rakenduste sünkroonimine ...) Liitu muu võrguga ... +Töölaua ülekandmine : h min aku täitumiseni tõstuklahv diff --git a/ash/strings/ash_strings_fa.xtb b/ash/strings/ash_strings_fa.xtb index c48fd148b7f71..e23ccb6ec2d3a 100644 --- a/ash/strings/ash_strings_fa.xtb +++ b/ash/strings/ash_strings_fa.xtb @@ -71,6 +71,7 @@ ‏CAPS LOCK روشن است صفحه نمایش داخلی بعد از همگام‌سازی تنظیمات شما، زبان از «» به «» تغییر کرد. +در حال فرستادن $1 صفحه‌نمایش بریل متصل شد. ‏روشن کردن Wi-Fi در... به اشتراک گذاشتن کنترل صفحه‌تان با از طریق راهنمایی از راه دور. @@ -94,15 +95,18 @@ ٪ باقیمانده روش‌های ورودی جلسه در به پایان می‌رسد. از سیستم خارج خواهید شد. +فرستادن میزکار به % بلندگو (داخلی) صفحه‌کلید روی صفحه فعال شد +حالت میزکار یکپارچه قفسه ‏وقتی Chromebook روشن است ممکن است شارژ نشود. از شارژر مخصوص دستگاه استفاده کنید. میزان صدا تمام کاربران موجود قبلاً به این جلسه اضافه شده‌اند. جستجو اطلاعات شبکه +قفل چرخش غیرفعال شود زمان باقیمانده تا خالی‌شدن شارژ باتری، خروج از مهمان منوی قبلی @@ -110,6 +114,7 @@ عکس از صفحه‌نمایش غیرفعال است راست تلفن همراه... +قفل چرخش فعال شود تنظیمات در حال همگام‌سازی برنامه‌ها… حساب‌ها @@ -120,6 +125,7 @@ دستگاه بلوتوث «» برای مرتبط‌سازی به مجوز نیاز دارد. Wi-Fi کلیک‌های خودکار +هیچ دستگاه فرستادنی وجود ندارد : در حال اتصال... به صورت خودکار در عرض از سیستم خارج می‌شوید. نمایش ناشناخته @@ -128,7 +134,8 @@ باتری به شارژر برق ضعیف متصل است. شارژ باتری ممکن است قابل اطمینان نباشد. سینی وضعیت، زمان ، ‏ قفل -برنامه‌های کاربردی +برنامه‌ها +واسط کاربری ورود به سیستم جدید خاموش است خاموش کردن مدیریت حساب‌ها دوربین در حال استفاده است. @@ -147,6 +154,7 @@ هدفون درحال جستجو برای دستگاه‌ها... ، +واسط کاربری ورود به سیستم جدید روشن است به اشتراک گذاشتن کنترل صفحه‌تان از طریق راهنمایی از راه دور. میکروفن (داخلی) یک خطا روی داد @@ -181,7 +189,7 @@ دستگاه بلوتوث «» برای مرتبط‌سازی به مجوز نیاز دارد. لطفاً این کد پین را در آن دستگاه وارد کنید: هم‌اکنون از سیستم خارج خواهید شد. تنظیم داده‌های دستگاه همراه -بیشتر بیاموزید +بیشتر بدانید برگرداندن به وضوح قدیمی در دوربین و میکروفن در حال استفاده هستند. گزینه‌ها @@ -200,6 +208,7 @@ Alt+جستجو یا Shift را برای لغو فشار دهید. خروجی راه انداز (همگام‌سازی برنامه‌ها...) پیوستن به شبکه دیگر… +در حال فرستادن میزکار : ساعت دقیقه مانده تا باتری شارژ شود تبدیل diff --git a/ash/strings/ash_strings_fi.xtb b/ash/strings/ash_strings_fi.xtb index 13693b6cfa115..c89814c8e5ac8 100644 --- a/ash/strings/ash_strings_fi.xtb +++ b/ash/strings/ash_strings_fi.xtb @@ -72,6 +72,7 @@ Vaihda syöttötapaa painamalla Shift + Alt. CAPS LOCK on päällä Sisäinen näyttö Käyttökieli on muutettu kielestä kieleksi asetustesi synkronoinnin yhteydessä. +Suoratoistetaan $1 Pistekirjoitusnäyttö on yhdistetty. Ota Wi-Fi käyttöön… Näyttösi hallinta jaetaan käyttäjän kanssa Etätuen kautta. @@ -96,15 +97,18 @@ Vaihda syöttötapaa painamalla Shift + Alt. % jäljellä Syöttötavat Istunnon loppumiseen on . Sinut kirjataan ulos. +Suoratoista työpöytä: % Kaiutin (sisäinen) Ruutunäppäimistö otettiin käyttöön +Yhtenäisen työpöydän tila Hylly Chromebookisi ei välttämättä lataudu sen ollessa päällä. Harkitse virallisen laturin käyttämistä. Äänenvoimakkuus Kaikki käytettävissä olevat käyttäjät on jo lisätty tähän istuntoon. Haku Verkon tiedot +Poista näytön kierron lukitus käytöstä Akku on tyhjä kuluttua Sulje vierastila Edellinen valikko @@ -112,6 +116,7 @@ Vaihda syöttötapaa painamalla Shift + Alt. Kuvakaappaukset poissa käytöstä Oikealle Mobiiliverkot... +Ota näytön kierron lukitus käyttöön Asetukset Synkronoidaan sovelluksia... Tilit @@ -122,6 +127,7 @@ Vaihda syöttötapaa painamalla Shift + Alt. Bluetooth-laite pyytää lupaa laiteparin muodostamiseen. Wi-Fi Automaattiset klikkaukset +Ei suoratoistolaitteita : Yhdistetään… Sinut kirjataan ulos automaattisesti, aikaa jäljellä . Tuntematon näyttö @@ -131,6 +137,7 @@ Vaihda syöttötapaa painamalla Shift + Alt. Tila-alue, aika , Lukitse Sovellukset +Uusi kirjautumiskäyttöliittymä EI ole käytössä. Sammuta Hallinnoi tilejä Kamera on käytössä. @@ -149,6 +156,7 @@ Vaihda syöttötapaa painamalla Shift + Alt. Kuulokkeet Etsitään laitteita... , +Uusi kirjautumiskäyttöliittymä ON käytössä. Näyttösi hallinta jaetaan Etätuen kautta. Mikrofoni (sisäinen) Tapahtui virhe @@ -199,6 +207,7 @@ Vaihda syöttötapaa painamalla Shift + Alt. Äänentoisto Käynnistysohjelma (synkronoidaan sovelluksia…) Liity muuhun verkkoon... +Suoratoistetaan työpöytää : Akku täynnä t min kuluttua shift diff --git a/ash/strings/ash_strings_fil.xtb b/ash/strings/ash_strings_fil.xtb index 54f368ddd2f48..244f2ab764a2a 100644 --- a/ash/strings/ash_strings_fil.xtb +++ b/ash/strings/ash_strings_fil.xtb @@ -72,6 +72,7 @@ Pindutin ang Shift + Alt upang magpalit. Naka-on ang CAPS LOCK Panloob na Display Nagbago ang wika mula "" patungong "" pagkatapos i-sync ang iyong mga setting. +Ikina-cast ang $1 Nagkonekta ng braille display. I-on ang Wi-Fi... Pagbabahagi ng kontrol sa iyong screen gamit ang sa pamamagitan ng Remote Assistance. @@ -96,15 +97,18 @@ Pindutin ang Shift + Alt upang magpalit. % ang natitira Mga pamamaraan ng pag-input Matatapos ang session pagkalipas ng . Masa-sign out ka. +I-cast ang desktop sa % Speaker (Internal) Naka-enable ang on-screen na keyboard +Unified desktop mode Shelf Maaaring hindi mag-charge ang iyong Chromebook habang naka-on ito. Pag-isipang gamitin ang opisyal na charger. Volume Naidagdag na ang lahat ng available na user sa session na ito. Hanapin Impormasyon ng Network +I-disable ang lock sa pag-rotate Natitirang oras bago maubos ang baterya, Lumabas sa session ng bisita Nakaraang menu @@ -112,6 +116,7 @@ Pindutin ang Shift + Alt upang magpalit. Naka-disable ang mga screenshot Kanan Mobile ... +I-enable ang lock sa pag-rotate Mga Setting Nagsi-sync ng apps... Mga Account @@ -122,6 +127,7 @@ Pindutin ang Shift + Alt upang magpalit. Gusto ng bluetooth device na "" na magpares. Wi-Fi Mga awtomatikong pag-click +Walang mga cast device : Kumokonekta... Awtomatiko kang masa-sign out sa loob ng . Hindi Kilalang Display @@ -131,6 +137,7 @@ Pindutin ang Shift + Alt upang magpalit. Status tray, oras , I-lock Mga App +Naka-OFF ang bagong UI sa pag-login Shut down Pamahalaan ang mga account Ginagamit ang camera. @@ -149,6 +156,7 @@ Pindutin ang Shift + Alt upang magpalit. Headphone Nag-i-scan para sa mga device... , +Naka-ON ang bagong UI sa pag-login Pagbabahagi ng kontrol sa iyong screen sa pamamagitan ng Remote Assistance. Microphone (Panloob) May isang naganap na error @@ -202,6 +210,7 @@ Pindutin ang Alt+Search o Shift upang kanselahin. Output Launcher (nagsi-sync ng mga app...) Sumali sa iba... +Ikina-cast ang desktop : o m hanggang mapuno shift diff --git a/ash/strings/ash_strings_fr.xtb b/ash/strings/ash_strings_fr.xtb index 2352fa86c13e6..0adc7ae23a133 100644 --- a/ash/strings/ash_strings_fr.xtb +++ b/ash/strings/ash_strings_fr.xtb @@ -72,6 +72,7 @@ Appuyez sur Maj + Alt pour en utiliser un autre. Touche VERR MAJ activée Affichage interne La langue utilisée est passée de "" à "" après la synchronisation de vos paramètres. +Diffusion de l'onglet "$1" en cours La plage braille est connectée. Activer le Wi-Fi… Partager le contrôle de votre écran avec  via l'assistance à distance @@ -96,15 +97,18 @@ Appuyez sur Maj + Alt pour en utiliser un autre.  % restant(s) Modes de saisie Fin de la session dans . Vous allez être déconnecté. +Caster le Bureau sur  % Haut-parleur (interne) Clavier à l'écran activé +Mode bureau unifié Étagère Votre Chromebook risque de ne pas charger lorsqu'il est allumé. Utilisez plutôt le chargeur officiel. Volume Tous les utilisateurs disponibles ont déjà été ajoutés à cette session. Rechercher Informations réseau +Désactiver le verrouillage de la rotation Temps restant avant que la batterie ne soit vide : . Fermer la session Invité Menu précédent @@ -112,6 +116,7 @@ Appuyez sur Maj + Alt pour en utiliser un autre. Captures d'écran désactivées Vers la droite Mobile… +Activer le verrouillage de la rotation Paramètres Synchronisation des applications… Comptes @@ -122,6 +127,7 @@ Appuyez sur Maj + Alt pour en utiliser un autre. L'appareil Bluetooth "" demande l'autorisation de s'associer. Wi-Fi Clics automatiques +Aucun appareil Cast  : Connexion en cours… Vous allez être déconnecté automatiquement dans . Écran inconnu @@ -131,6 +137,7 @@ Appuyez sur Maj + Alt pour en utiliser un autre. Barre d'état – Heure : , Verrouiller Applications +Nouvelle interface utilisateur de connexion désactivée Éteindre Gérer les comptes La caméra est en cours d'utilisation. @@ -149,6 +156,7 @@ Appuyez sur Maj + Alt pour en utiliser un autre. Casque Recherche d'appareils en cours… +Nouvelle interface utilisateur de connexion activée Partager le contrôle de votre écran via l'assistance à distance Micro (interne) Une erreur s'est produite. @@ -202,6 +210,7 @@ Appuyez sur Alt + Recherche ou Maj pour le désactiver. Sortie Lanceur d'applications (synchronisation des applications en cours…) Autre réseau… +Diffusion du Bureau en cours…  : Encore  h  min de chargement maj diff --git a/ash/strings/ash_strings_gu.xtb b/ash/strings/ash_strings_gu.xtb index 5619d8c1f02ed..c07f8eb80be8f 100644 --- a/ash/strings/ash_strings_gu.xtb +++ b/ash/strings/ash_strings_gu.xtb @@ -72,6 +72,7 @@ CAPS LOCK ચાલુ છે આંતરિક પ્રદર્શન તમારી સેટિંગ્સ સમન્વયિત કર્યા પછી ભાષા "" થી "" માં બદલાઈ ગઈ છે. +$1 કાસ્ટ કરી રહ્યાં છે બ્રેઇલ પ્રદર્શન કનેક્ટ થયું. Wi-Fi ચાલુ કરો... દૂરસ્થ સહાય વડે સાથે તમારી સ્ક્રીનનું નિયંત્રણ શેર કરવું. @@ -96,15 +97,18 @@ % બાકી ઇનપુટ પદ્ધતિઓ માં સત્ર સમાપ્ત થાય છે. તમને સાઇન આઉટ કરવામાં આવશે. +આ પર ડેસ્કટૉપને કાસ્ટ કરો % સ્પીકર (આંતરિક) ઓન-સ્ક્રીન કીબોર્ડ સક્ષમ કર્યું +એકીકૃત ડેસ્કટૉપ મોડ શેલ્ફ જ્યારે તમારી Chromebook ચાલુ હોય ત્યારે તેને ચાર્જ કરી શકાશે નહીં. અધિકૃત ચાર્જરનો ઉપયોગ કરવાનું વિચારો. વૉલ્યૂમ બધા ઉપલબ્ધ વપરાશકર્તાઓ પહેલેથી જ આ સત્ર પર ઉમેરવામાં આવ્યા છે. શોધો નેટવર્ક માહિતી +પરિભ્રમણ લૉક અક્ષમ કરો બેટરી ખાલી થવામાં બાકી સમય, અતિથિથી બહાર નીકળો પહેલાનું મેનૂ @@ -112,6 +116,7 @@ સ્ક્રીનશોટ્સ અક્ષમ કર્યા જમણે મોબાઇલ ... +પરિભ્રમણ લૉક સક્ષમ કરો સેટિંગ્સ એપ્લિકેશન્સને સમન્વયિત કરી રહ્યું છે... એકાઉન્ટ્સ @@ -122,6 +127,7 @@ Bluetooth ઉપકરણ "" ને જોડી બનાવવા માટે પરવાનગી જોઈએ છે. Wi-Fi આપમેળે ક્લિક્સ +કોઈ કાસ્ટ ઉપકરણો નથી : કનેક્ટ કરી રહ્યું છે... તમે આપમેળે માંથી સાઇન આઉટ થઇ જશો. અજ્ઞાત પ્રદર્શન @@ -131,6 +137,7 @@ સ્થિતિ ટ્રે, સમય , લૉક એપ્સ +નવું લોગિન UI બંધ છે શટ ડાઉન કરો એકાઉન્ટ્સનું સંચાલન કરો કૅમેરો ઉપયોગમાં છે. @@ -149,6 +156,7 @@ હેડફોન ઉપકરણો માટે સ્કેન કરી રહ્યું છે... , +નવું લોગિન UI ચાલુ છે દૂરસ્થ સહાય વડે તમારી સ્ક્રીનનું નિયંત્રણ શેર કરવું. માઇક્રોફોન (આંતરિક) કોઈ ભૂલ આવી છે @@ -201,6 +209,7 @@ આઉટપુટ લોન્ચર (એપ્લિકેશન્સને સમન્વયિત કરી રહ્યું છે..) અન્યથી જોડાઓ... +ડેસ્કટૉપ કાસ્ટ કરી રહ્યાં છે : મિ સુધીમાં પૂર્ણ shift diff --git a/ash/strings/ash_strings_hi.xtb b/ash/strings/ash_strings_hi.xtb index 3f4671bcd4366..7ac32087038b0 100644 --- a/ash/strings/ash_strings_hi.xtb +++ b/ash/strings/ash_strings_hi.xtb @@ -72,6 +72,7 @@ CAPS LOCK चालू है आंतरिक डिस्प्ले आपकी सेटिंग समन्वयित करने के बाद भाषा को "" से "" में बदल दिया गया है. +$1 को कास्ट किया जा रहा है ब्रेल डिस्प्ले कनेक्ट हो गया. वाई-फ़ाई चालू करें... आपकी स्‍क्रीन का नियंत्रण दूरस्‍थ सहायक के द्वारा से साझा किया जा रहा है. @@ -96,15 +97,18 @@ % शेष है इनपुट पद्धतियां सत्र में समाप्त होने वाला है. आप प्रस्थान कर जाएंगे. +डेस्कटॉप को इस पर कास्ट करें % स्पीकर (आंतरिक) ऑन-स्‍क्रीन कीबोर्ड सक्षम है +एकीकृत डेस्कटॉप मोड शेल्फ़ हो सकता है चालू होने पर आपका Chromebook चार्ज न हो. आधिकारिक चार्जर उपयोग करें. मात्रा सभी उपलब्‍ध उपयोगकर्ता पहले से इस सत्र में जोड़ दिए गए हैं. खोज नेटवर्क जानकारी +रोटेशन लॉक को अक्षम करें बैटरी के खाली होने में शेष समय, अतिथि सत्र से बाहर निकलें पिछला मेनू @@ -112,6 +116,7 @@ स्क्रीनशॉट अक्षम हैं दाएं मोबाइल ... +रोटेशन लॉक को सक्षम करें सेटिंग्स ऐप्स समन्वयित किए जा रहे हैं... खाते @@ -122,6 +127,7 @@ ब्लूटूथ डिवाइस "" युग्मित करने की अनुमति चाहता है. वाई-फ़ाई स्वत: क्‍लिक +कोई कास्ट डिवाइस नहीं : कनेक्ट हो रहा है... आप में अपने आप प्रस्थान कर जाएंगे. अज्ञात डिस्प्ले @@ -131,6 +137,7 @@ स्थिति ट्रे, समय , लॉक करें ऐप्स +नया प्रवेश UI बंद है शट डाउन करें खाते प्रबंधित करें कैमरे का उपयोग हो रहा है. @@ -149,6 +156,7 @@ हेडफ़ोन डिवाइस स्कैन किए जा रहे हैं... , +नया प्रवेश UI चालू है आपकी स्‍क्रीन का नियंत्रण दूरस्‍थ सहायका के द्वारा साझा किया जा रहा है. माइक्रोफ़ोन (आंतरिक) कोई त्रुटि आई @@ -201,6 +209,7 @@ आउटपुट लॉन्‍चर (ऐप्‍स समन्‍वयित किए जा रहे हैं...) अन्य में शामिल हों... +डेस्कटॉप को कास्ट किया जा रहा है : पूरी तरह से चार्ज होने में घं मि शेष shift diff --git a/ash/strings/ash_strings_hr.xtb b/ash/strings/ash_strings_hr.xtb index a020f85788459..e119f18b3bf5e 100644 --- a/ash/strings/ash_strings_hr.xtb +++ b/ash/strings/ash_strings_hr.xtb @@ -72,6 +72,7 @@ Pritisnite Shift + Alt za promjenu. Opcija CAPS LOCK uključena Unutarnji zaslon Jezik je promijenjen iz: "" u: "" nakon sinkronizacije vaših postavki. +Emitiranje kartice $1 Brajev je redak povezan. Uključite Wi-Fi... i vi dijelite kontrolu nad zaslonom putem Daljinske pomoći. @@ -96,15 +97,18 @@ Pritisnite Shift + Alt za promjenu. Preostalo % Načini unosa Sesija će završiti za . Odjavit ćete se. +Emitirajte radnu površinu na % Zvučnik (ugrađeni) Tipkovnica na zaslonu omogućena je +Način jedinstvene radne površine Polica Chromebook se možda neće puniti dok je uključen. Savjetujemo upotrebu službenog punjača. Glasnoća Svi dostupni korisnici već su dodani ovoj sesiji. Traži Podaci o mreži +Onemogući zaključavanje rotacije Baterija će se isprazniti za Izlazak iz sesije gosta Prethodni izbornik @@ -112,6 +116,7 @@ Pritisnite Shift + Alt za promjenu. Snimke zaslona onemogućene su Udesno Mobilne mreže... +Omogući zaključavanje rotacije Postavke Sinkroniziranje aplikacija... Računi @@ -122,6 +127,7 @@ Pritisnite Shift + Alt za promjenu. Bluetooth uređaj "" traži dopuštenje za uparivanje. Wi-Fi Automatski klikovi +Nema uređaja za emitiranje : povezivanje... Automatski ćete se odjaviti za . Nepoznati zaslon @@ -131,6 +137,7 @@ Pritisnite Shift + Alt za promjenu. Traka statusa, vrijeme , Zaključaj Aplikacije +Novo je korisničko sučelje za prijavu ISKLJUČENO Isključi Upravljaj računima Fotoaparat je aktivan. @@ -149,6 +156,7 @@ Pritisnite Shift + Alt za promjenu. Slušalice Pretraživanje uređaja... , +Novo je korisničko sučelje za prijavu UKLJUČENO Dijelite kontrolu nad zaslonom putem Daljinske pomoći. Mikrofon (ugrađeni) Došlo je do pogreške @@ -202,6 +210,7 @@ Pritisnite tipke Alt + Pretraživanje ili Shift da biste ju isključili.Izlaz Pokretač (sinkronizacija aplikacija...) Pridruži se drugoj... +Emitiranje radne površine : h min do završetka punjenja shift diff --git a/ash/strings/ash_strings_hu.xtb b/ash/strings/ash_strings_hu.xtb index f9982f64b6cd3..8efc1dd8449ad 100644 --- a/ash/strings/ash_strings_hu.xtb +++ b/ash/strings/ash_strings_hu.xtb @@ -72,6 +72,7 @@ A váltáshoz nyomja meg a Shift + Alt billentyűkódot. A CAPS LOCK be van kapcsolva Belső kijelző A beállítások szinkronizálását követően "" nyelvről "" nyelvre változott a nyelvi beállítás. +$1 átküldése Braille-kijelző csatlakoztatva. Wi-Fi bekapcsolása... A képernyő irányításának megosztása segítővel a Távsegítség szolgáltatás keretein belül. @@ -96,15 +97,18 @@ A váltáshoz nyomja meg a Shift + Alt billentyűkódot. % maradt Beviteli módszerek A munkamenet múlva véget ér. A rendszer ekkor kijelentkezteti Önt. +Asztal átküldése a következőre % Hangszóró (belső) Képernyő-billentyűzet bekapcsolva +Egységes asztali mód Polc Előfordulhat, hogy a Chromebook nem töltődik, amíg be van kapcsolva. Vegye fontolóra a gyári töltő használatát. Hangerő Minden elérhető felhasználót hozzáadott a munkamenethez. Keresés Hálózatinformáció +Az elforgatás zárolásának letiltása Akkumulátor lemerüléséig hátralévő idő: Kilépés a vendég munkamenetből Előző menü @@ -112,6 +116,7 @@ A váltáshoz nyomja meg a Shift + Alt billentyűkódot. Képernyőképek letiltva Jobbra Mobil... +Az elforgatás zárolásának engedélyezése Beállítások Alkalmazások szinkronizálása... Fiókok @@ -122,6 +127,7 @@ A váltáshoz nyomja meg a Shift + Alt billentyűkódot. A(z) „” Bluetooth-eszköz engedélyt kér a párosításra. Wi-Fi Automatikus kattintások +Nem található Cast-eszköz : csatlakozás... A rendszer automatikusan kijelentkezteti Önt idő múlva. Ismeretlen kijelző @@ -131,6 +137,7 @@ A váltáshoz nyomja meg a Shift + Alt billentyűkódot. Állapotterület, idő: , Zárolás Alkalmazások +Az új bejelentkezési felhasználói felület ki van kapcsolva Leállítás Fiókok kezelése A kamera épp használatban van. @@ -149,6 +156,7 @@ A váltáshoz nyomja meg a Shift + Alt billentyűkódot. Fülhallgató Eszközök keresése... , +Az új bejelentkezési felhasználói felület be van kapcsolva A képernyő irányításának megosztása a Távsegítség szolgáltatás keretein belül. Mikrofon (belső) Hiba történt @@ -202,6 +210,7 @@ Kikapcsolásához nyomja meg az Alt + Keresés vagy a Shift billentyűt.Kimenet Indító (alkalmazások szinkronizálása…) Csatlakozás másik hálózathoz... +Asztal átküldése : ó p a teljes feltöltésig shift diff --git a/ash/strings/ash_strings_id.xtb b/ash/strings/ash_strings_id.xtb index 19371ae9653bd..da28c8e91c82b 100644 --- a/ash/strings/ash_strings_id.xtb +++ b/ash/strings/ash_strings_id.xtb @@ -72,6 +72,7 @@ Tekan Shift + Alt untuk beralih. CAPS LOCK aktif Tampilan Internal Bahasa telah diubah dari "" menjadi "" setelah menyinkronkan setelan Anda. +Mentransmisi $1 Layar Braille tersambung. Aktifkan Wi-Fi... Berbagi kontrol layar dengan via Remote Assistance. @@ -96,15 +97,18 @@ Tekan Shift + Alt untuk beralih. Sisa % Metode masukan Sesi berakhir dalam . Anda akan keluar. +Transmisikan desktop ke % Pengeras Suara (Internal) Keyboard di layar diaktifkan +Mode desktop terpadu Rak Chromebook Anda mungkin tidak mengisi daya saat sedang menyala. Pertimbangkan untuk menggunakan pengisi daya resmi. Volume Semua pengguna yang tersedia telah ditambahkan ke sesi ini. Telusuri Info Jaringan +Nonaktifkan penguncian rotasi Waktu yang tersisa hingga baterai kosong, Keluar dari sesi tamu Menu sebelumnya @@ -112,6 +116,7 @@ Tekan Shift + Alt untuk beralih. Tangkapan layar dinonaktifkan Kanan Seluler ... +Aktifkan penguncian rotasi Setelan Menyinkronkan aplikasi... Akun @@ -122,6 +127,7 @@ Tekan Shift + Alt untuk beralih. Perangkat Bluetooth "" meminta izin untuk bersanding. Wi-Fi Klik otomatis +Tidak ada perangkat transmisi : Menyambung... Anda akan dikeluarkan secara otomatis dalam . Tampilan yang Tidak Diketahui @@ -131,6 +137,7 @@ Tekan Shift + Alt untuk beralih. Baki status, waktu , Kunci Apl +UI proses masuk baru - NONAKTIF Matikan Kelola akun Kamera sedang digunakan. @@ -149,6 +156,7 @@ Tekan Shift + Alt untuk beralih. Headphone Memindai perangkat... , +UI proses masuk baru - AKTIF Berbagi kontrol layar via Remote Assistance. Mikrofon (Internal) Terjadi kesalahan @@ -202,6 +210,7 @@ Tekan Alt+Telusuri atau Shift untuk membatalkan. Keluaran Peluncur (menyinkronkan aplikasi...) Bergabung dengan lainnya... +Mentransmisi desktop : j m sampai penuh shift diff --git a/ash/strings/ash_strings_it.xtb b/ash/strings/ash_strings_it.xtb index f620321eca664..6d778e344e4ce 100644 --- a/ash/strings/ash_strings_it.xtb +++ b/ash/strings/ash_strings_it.xtb @@ -72,6 +72,7 @@ Premi Maiusc+Alt per cambiare metodo. BLOC MAIUSC è attivo Display interno La lingua è stata modificata da "" a "" dopo la sincronizzazione delle impostazioni. +Trasmissione $1 Display Braille collegato. Attiva Wi-Fi... Condividi il controllo dello schermo con tramite Assistenza remota. @@ -96,9 +97,11 @@ Premi Maiusc+Alt per cambiare metodo. % rimanente Metodi di immissione La sessione terminerà tra . Verrà eseguita la disconnessione. +Trasmetti desktop a % Altoparlante (interno) Tastiera sullo schermo attiva +Modalità desktop unificato Shelf Il Chromebook potrebbe non ricaricarsi mentre è accesso. Prova a utilizzare il caricabatterie ufficiale. Volume @@ -124,6 +127,7 @@ Premi Maiusc+Alt per cambiare metodo. Il dispositivo Bluetooth "" chiede l'autorizzazione per essere accoppiato. Wi-Fi Clic automatici +Nessun dispositivo di trasmissione : connessione... Verrai disconnesso automaticamente tra . Display sconosciuto @@ -206,6 +210,7 @@ Premi Alt+tasto per la ricerca o Maiusc per annullare. Uscita Avvio applicazioni (sincronizzazione delle app...) Connetti a un'altra... +Trasmissione desktop : h e m per completare la ricarica maiusc diff --git a/ash/strings/ash_strings_iw.xtb b/ash/strings/ash_strings_iw.xtb index 272d825ca80a5..0d8d086ca962e 100644 --- a/ash/strings/ash_strings_iw.xtb +++ b/ash/strings/ash_strings_iw.xtb @@ -72,6 +72,7 @@ ‏CAPS LOCK מופעל תצוגה פנימית ‏שפת Chrome השתנתה מ"" ל"" לאחר סנכרון ההגדרות. +מעביר את $1 צג ברייל מחובר ‏הפעל את ה-Wi-Fi... שיתוף השליטה במסך עם דרך סיוע מרחוק. @@ -96,9 +97,11 @@ %‎ נותרו שיטות קלט הפעילות באתר תסתיים בעוד . תנותק מהחשבון. +העברת שולחן העבודה אל % רמקול (פנימי) המקלדת שמופיעה במסך מופעלת +מצב שולחן עבודה מאוחד מדף ‏ייתכן שה-Chromebook שלך לא ייטען בזמן שהוא מופעל. מומלץ להשתמש במטען הראשי. עוצמת קול @@ -124,6 +127,7 @@ ‏מכשיר ה-Bluetooth ‏"" מבקש הרשאה לבצע התאמה. Wi-Fi לחיצות אוטומטיות +אין מכשירי העברה : מתחבר... תצא באופן אוטומטי בעוד . תצוגה לא ידועה @@ -205,6 +209,7 @@ פלט מפעיל היישומים (מסנכרן יישומים...) הצטרף לרשת אחרת... +מעביר את שולחן העבודה ‏: שעות ו- דקות עד לטעינה מלאה shift diff --git a/ash/strings/ash_strings_ja.xtb b/ash/strings/ash_strings_ja.xtb index 61917e628adf2..c8f14175840ad 100644 --- a/ash/strings/ash_strings_ja.xtb +++ b/ash/strings/ash_strings_ja.xtb @@ -72,6 +72,7 @@ Caps Lock がオンになっています 内蔵ディスプレイ 設定の同期後に言語が「」から「」に変更されました。 +$1 をキャスト中 ブライユ点字ディスプレイが接続されています。 Wi-Fi をオンにする... リモート サポート経由で と画面の制御を共有しています。 @@ -96,15 +97,18 @@ 残り % 入力方法 セッション終了まであと です。終了するとログアウトします。 +デスクトップをキャスト % スピーカー(内蔵) 画面キーボードが有効です +デスクトップ統合モード シェルフ この充電器がオンになっている間は、Chromebook が充電されない可能性があります。正規の充電器の使用をご検討ください。 音量 該当するすべてのユーザーをこのセッションに追加済みです。 検索 ネットワーク情報 +回転ロックを無効にする バッテリーが空になるまであと: ゲスト セッションを終了 前のメニュー @@ -112,6 +116,7 @@ スクリーンショットが無効 モバイル... +回転ロックを有効にする 設定 アプリの同期中... アカウント @@ -122,6 +127,7 @@ Bluetooth デバイス「」がペア設定の権限をリクエストしています。 Wi-Fi 自動クリック +キャスト デバイスがありません : 接続しています... あと で自動的にログアウトします。 不明なディスプレイ @@ -131,6 +137,7 @@ ステータス トレイ、時刻 ロック アプリ +新しいログイン画面が無効になっています 終了 アカウントを管理 カメラが使用中です。 @@ -149,6 +156,7 @@ ヘッドホン デバイスをスキャンしています... () +新しいログイン画面が有効になっています リモート サポート経由で画面の制御を共有しています。 マイク(内蔵) エラーが発生しました @@ -202,6 +210,7 @@ Alt+ 検索/Shift キーを押すと解除されます。 出力 ランチャー(アプリを同期中...) 他のネットワークに接続... +デスクトップをキャスト中 : フル充電まで 時間 shift diff --git a/ash/strings/ash_strings_kn.xtb b/ash/strings/ash_strings_kn.xtb index bce80d4615591..56a7594b3a242 100644 --- a/ash/strings/ash_strings_kn.xtb +++ b/ash/strings/ash_strings_kn.xtb @@ -72,6 +72,7 @@ CAPS LOCK ಆನ್ ಆಗಿದೆ ಆಂತರಿಕ ಪ್ರದರ್ಶನ ನಿಮ್ಮ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಸಿಂಕ್ ಮಾಡಿದ ನಂತರ ಭಾಷೆಯನ್ನು "" ನಿಂದ "" ಗೆ ಬದಲಾಯಿಸಲಾಗಿದೆ. +$1 ಬಿತ್ತರಿಸಲಾಗುತ್ತಿದೆ ಬ್ರೇಲ್ ಪ್ರದರ್ಶನವನ್ನು ಸಂಪರ್ಕಗೊಳಿಸಲಾಗಿದೆ. Wi-Fi ಆನ್ ಮಾಡಿ... ರಿಮೋಟ್ ಸಹಾಯದ ಮೂಲಕ ಜೊತೆಗೆ ನಿಮ್ಮ ಪರದೆಯ ನಿಯಂತ್ರಣವನ್ನು ಹಂಚಲಾಗುತ್ತಿದೆ. @@ -96,15 +97,18 @@ % ಉಳಿದಿದೆ ಇನ್‌ಪುಟ್ ವಿಧಾನಗಳು ಸೆಷನ್ ರಲ್ಲಿ ಕೊನೆಗೊಳ್ಳಲಿದೆ. ನೀವು ಸೈನ್ ಔಟ್ ಆಗಲಿರುವಿರಿ. +ಡೆಸ್ಕ್‌ಟಾಪ್ ಅನ್ನು ಇದಕ್ಕೆ ಬಿತ್ತರಿಸಿ % ಸ್ಪೀಕರ್ (ಆಂತರಿಕ) ಆನ್ ಸ್ಕ್ರೀನ್ ಕೀಬೋರ್ಡ್ ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ +ಏಕೀಕೃತ ಡೆಸ್ಕ್‌ಟಾಪ್ ಮೋಡ್ ಶೆಲ್ಫ್ ನಿಮ್ಮ Chromebook ಆನ್ ಆಗಿರುವಾಗ ಅದು ಚಾರ್ಜ್ ಆಗುವುದಿಲ್ಲ. ಅಧಿಕೃತ ಚಾರ್ಜರ್ ಬಳಸಿ. ವಾಲ್ಯೂಮ್ ಈ ಸೆಷನ್‌ಗೆ ಎಲ್ಲಾ ಲಭ್ಯವಿರುವ ಬಳಕೆದಾರರನ್ನು ಈಗಾಗಲೇ ಸೇರಿಸಲಾಗಿದೆ. ಹುಡುಕಾಟ ನೆಟ್‌ವರ್ಕ್ ಮಾಹಿತಿ +ತಿರುಗಿಸುವಿಕೆ ಲಾಕ್ ಅನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ ಬ್ಯಾಟರಿ ಖಾಲಿ ಆಗುವವರೆಗೆ ಉಳಿದಿರುವ ಸಮಯ, ಅತಿಥಿ ಸೆಶೆನ್‌ನಿಂದ ನಿರ್ಗಮಿಸು ಹಿಂದಿನ ಮೆನು @@ -112,6 +116,7 @@ ಸ್ಕ್ರೀನ್‌ಶಾಟ್‌ಗಳನ್ನು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ ಬಲಕ್ಕೆ ಮೊಬೈಲ್... +ತಿರುಗಿಸುವಿಕೆ ಲಾಕ್ ಅನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ ಸೆಟ್ಟಿಂಗ್‌ಗಳು ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ಸಿಂಕ್ ಮಾಡಲಾಗುತ್ತಿದೆ... ಖಾತೆಗಳು @@ -122,6 +127,7 @@ ಬ್ಲೂಟೂತ್‌‌ ಸಾಧನವು "" ಜೋಡಣೆಗಾಗಿ ಅನುಮತಿಯನ್ನು ಬಯಸುತ್ತದೆ. Wi-Fi ಸ್ವಯಂಚಾಲಿತ ಕ್ಲಿಕ್‌ಗಳು +ಯಾವುದೇ ಬಿತ್ತರಿಸುವಿಕೆಯ ಸಾಧನಗಳಿಲ್ಲ : ಸಂಪರ್ಕಿಸಲಾಗುತ್ತಿದೆ... ನಲ್ಲಿ ನಿಮ್ಮನ್ನು ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಸೈನ್‌ಔಟ್‌ ಮಾಡಲಾಗುತ್ತದೆ. ಅಜ್ಞಾತ ಪ್ರದರ್ಶನ @@ -131,6 +137,7 @@ ಸ್ಥಿತಿ ಟ್ರೇ, ಸಮಯ , ಲಾಕ್ ಮಾಡಿ ಆಪ್ಸ್‌‌ +ಹೊಸ ಲಾಗಿನ್ UI ಆಫ್ ಆಗಿದೆ ಮುಚ್ಚಿಬಿಡಿ ಖಾತೆಗಳನ್ನು ನಿರ್ವಹಿಸು ಕ್ಯಾಮರಾ ಬಳಕೆಯಲ್ಲಿದೆ. @@ -149,6 +156,7 @@ ಹೆಡ್‌ಫೋನ್ ಸಾಧನಗಳಿಗಾಗಿ ಸ್ಕ್ಯಾನ್ ಮಾಡಲಾಗುತ್ತಿದೆ... , +ಹೊಸ ಲಾಗಿನ್ UI ಆನ್ ಆಗಿದೆ ರಿಮೋಟ್ ಸಹಾಯಕದ ಮೂಲಕ ನಿಮ್ಮ ಪರದೆಯ ಹಂಚಿಕೆಯ ನಿಯಂತ್ರಣ ಮೈಕ್ರೊಫೋನ್ (ಆಂತರಿಕ) ದೋಷವೊಂದು ಕಾಣಿಸಿಕೊಂಡಿದೆ @@ -201,6 +209,7 @@ ಔಟ್‌ಪುಟ್ ಲಾಂಚರ್ (ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು ಸಿಂಕ್ ಮಾಡಲಾಗುತ್ತಿದೆ...) ಇತರರನ್ನು ಸೇರಿ... +ಡೆಸ್ಕ್‌ಟಾಪ್ ಬಿತ್ತರಿಸಲಾಗುತ್ತಿದೆ : ಪೂರ್ಣವಾಗುವವರಗೆ ಗಂ ನಿ shift diff --git a/ash/strings/ash_strings_ko.xtb b/ash/strings/ash_strings_ko.xtb index 49316fdde4a74..a9a753c0c13a0 100644 --- a/ash/strings/ash_strings_ko.xtb +++ b/ash/strings/ash_strings_ko.xtb @@ -72,6 +72,7 @@ CAPS LOCK이 켜져 있습니다. 내부 디스플레이 설정을 동기화한 뒤 Chrome의 언어가 ''에서 ''(으)로 변경되었습니다. +$1 전송 점자 디스플레이가 연결되었습니다. Wi-Fi 사용... 원격 지원을 통해 와(과) 화면 제어 공유 @@ -96,15 +97,18 @@ % 남음 입력 방법 세션이 후에 종료되어 로그아웃됩니다. +바탕화면 전송 대상 % 스피커(내부) 터치 키보드 사용 설정됨 +통합 바탕화면 모드 임시보관함 Chromebook이 켜져 있으면 충전되지 않을 수 있습니다. 공식 충전기를 사용해보세요. 볼륨 사용 가능한 모든 사용자가 이미 이 세션에 추가되었습니다. 검색 네트워크 정보 +회전 잠금 사용 안함 남은 배터리 사용 시간은 입니다. 손님 세션 종료 이전 메뉴 @@ -112,6 +116,7 @@ 스크린샷 캡쳐 사용 중지됨 오른쪽 모바일 ... +회전 잠금 사용 설정 앱 동기화... 계정 @@ -122,6 +127,7 @@ 블루투스 기기 ''에서 페어링 허가를 요청합니다. Wi-Fi 자동 클릭 +전송 기기 없음 : 연결하는 중... 후 자동으로 로그아웃됩니다. 알 수 없는 디스플레이 @@ -131,6 +137,7 @@ 상태 표시줄, 시간 , 잠금 +새 로그인 UI 사용 안함 종료 계정 관리 카메라가 사용 중입니다. @@ -149,6 +156,7 @@ 헤드폰 기기 검색 중... +새 로그인 UI 사용 원격 지원을 통해 화면 제어 공유 마이크(내부) 오류가 발생했습니다. @@ -202,6 +210,7 @@ 출력 런처(앱 동기화 중...) 다른 네트워크에 연결 +바탕화면 전송 : 충전 완료까지 시간 분 남음 Shift diff --git a/ash/strings/ash_strings_lt.xtb b/ash/strings/ash_strings_lt.xtb index 37915e57552ed..600db32aac269 100644 --- a/ash/strings/ash_strings_lt.xtb +++ b/ash/strings/ash_strings_lt.xtb @@ -72,6 +72,7 @@ DIDŽIŲJŲ RAIDŽIŲ RAŠYMAS įjungtas Vidinė pateiktis Po nustatymų sinchronizavimo kalba pakeista iš į . +Perduodama (1 USD) Brailio ekranas prijungtas. Įjungti „Wi-Fi“... gali valdyti jūsų ekraną naudodamas (-a) Nuotolinę pagalbą. @@ -96,15 +97,18 @@ Liko proc. Įvesties metodai Sesija baigsis po . Būsite atjungti. +Perduoti darbalaukį į % Garsiakalbis (vidinis) Ekrano klaviatūra įgalinta +Vieno darbalaukio režimas Lentyna „Chromebook“ gali nebūti įkraunamas, kai jis įjungtas. Apsvarstykite galimybę naudoti originalų įkroviklį. Apimtis Prie šio seanso jau pridėti visi galimi naudotojai. Ieškoti Tinklo informacija +Išjungti pasukimo užrakinimą Laikas, likęs iki akumuliatoriaus išsikrovimo: Išeiti iš svečio režimo Ankstesnis meniu @@ -112,6 +116,7 @@ Ekrano kopijos išjungtos Dešinė Mobilusis... +Įgalinti pasukimo užrakinimą Nustatymai Sinchronizuojamos programos... Paskyros @@ -122,6 +127,7 @@ „Bluetooth“ įrenginys „“ prašo leidimo susieti. WI-Fi Automatiniai paspaudimai +Nėra perdavimo įrenginių “: jungiamasi... Būsite automatiškai atjungti po . Nežinoma pateiktis @@ -131,6 +137,7 @@ Būsenos dėklas, laikas , Užrakinti Taikomosios programos +Nauja prisijungimo NS IŠJUNGTA Stabdyti Valdyti paskyras Kamera naudojama. @@ -149,6 +156,7 @@ Ausinės Ieškoma įrenginių... , +Nauja prisijungimo NS ĮJUNGTA Leidžiama valdyti jūsų ekraną naudojant Nuotolinę pagalbą. Mikrofonas (vidinis) Įvyko klaida @@ -202,6 +210,7 @@ Jei norite atšaukti, paspauskite „Alt“ + paieškos klavišas arba „Alt“ Išvestis Paleidimo priemonė (sinchronizuojamos programos...) Prisijungti prie kito... +Perduodamas darbalaukis : val. min. iki visiško įkrovimo shift diff --git a/ash/strings/ash_strings_lv.xtb b/ash/strings/ash_strings_lv.xtb index 9d11e5dab1bc7..416bb9644ae6f 100644 --- a/ash/strings/ash_strings_lv.xtb +++ b/ash/strings/ash_strings_lv.xtb @@ -72,6 +72,7 @@ Lai to pārslēgtu, nospiediet taustiņu kombināciju Shift+Alt. Funkcija Caps Lock ir ieslēgta Iekšējais displejs Pēc jūsu iestatījumu sinhronizēšanas valoda ir mainīta no uz . +Notiek $1 apraide Savienojums ar Braila displeju ir izveidots. Ieslēgt Wi-Fi... Ekrāna pārvaldības koplietošana ar , izmantojot attālo palīdzību. @@ -96,15 +97,18 @@ Lai to pārslēgtu, nospiediet taustiņu kombināciju Shift+Alt. Atlikums: % Ievades metodes Atlikušais laiks līdz šīs sesijas beigām: . Jūs tiksiet izrakstīts. +Apraidīt darbvirsmu uz šo vietu: % Skaļrunis (iekšējais) Ekrāna tastatūra iespējota +Vienots darbvirsmas režīms Plaukts Jūsu Chromebook dators, iespējams, netiks uzlādēts, kamēr tas ir ieslēgts. Ieteicams izmantot oriģinālo lādētāju. Skaļums Visi pieejamie lietotāji jau ir pievienoti šai sesijai. Meklēt Tīkla informācija +Atspējot rotācijas bloķēšanu Atlikušais akumulatora darbības laiks: . Aizvērt viesa sesiju Iepriekšējā izvēlne @@ -112,6 +116,7 @@ Lai to pārslēgtu, nospiediet taustiņu kombināciju Shift+Alt. Ekrānuzņēmumi atspējoti Pa labi Mobilās ierīces... +Iespējot rotācijas bloķēšanu Iestatījumi Notiek lietotņu sinhronizēšana... Konti @@ -122,6 +127,7 @@ Lai to pārslēgtu, nospiediet taustiņu kombināciju Shift+Alt. Bluetooth ierīce “” vēlas saņemt atļauju, lai izveidotu savienojumu pārī. Wi-Fi Automātiskie klikšķi +Nav nevienas apraides ierīces : notiek savienojuma izveide... Jūs tiksiet automātiski izrakstīts pēc šāda laika: . Nezināms displejs @@ -131,6 +137,7 @@ Lai to pārslēgtu, nospiediet taustiņu kombināciju Shift+Alt. Statusa josla, laiks: . Bloķēt Lietotnes +Jaunā pieteikšanās lietotāja saskarne ir izslēgta Beidzēt Pārvaldīt kontus Kamera tiek lietota. @@ -149,6 +156,7 @@ Lai to pārslēgtu, nospiediet taustiņu kombināciju Shift+Alt. Austiņas Notiek ierīču meklēšana... , +Jaunā pieteikšanās lietotāja saskarne ir ieslēgta Ekrāna pārvaldības koplietošana, izmantojot attālo palīdzību. Mikrofons (iekšējais) Radās kļūda @@ -202,6 +210,7 @@ Lai atceltu tā funkcionalitāti, nospiediet Alt+Meklēt vai Shift.Izvade Palaišanas programma (notiek lietotņu sinhronizēšana...) Pievienoties citam... +Notiek darbvirsmas apraide : Līdz pilnīgai uzlādei atlikušais laiks:  h  min shift diff --git a/ash/strings/ash_strings_ml.xtb b/ash/strings/ash_strings_ml.xtb index d5b962ff4d902..8dbbbfafa12fd 100644 --- a/ash/strings/ash_strings_ml.xtb +++ b/ash/strings/ash_strings_ml.xtb @@ -72,6 +72,7 @@ CAPS LOCK ഓൺ ആണ് ആന്തരിക പ്രദർശനം നിങ്ങളുടെ ക്രമീകരണങ്ങള്‍ സമന്വയിപ്പിച്ചതിന് ശേഷം ഭാഷ "" എന്നതില്‍ നിന്ന് "" എന്നതിലേക്ക് മാറി. +$1 കാസ്റ്റുചെയ്യുന്നു ബ്രെയ്‌ലി ഡിസ്‌പ്ലേ കണക്‌റ്റുചെയ്‌തു. Wi-Fi ഓണാക്കുക... ഉപയോഗിച്ച് നിങ്ങളുടെ വിദൂര സഹായി മുഖേന സ്‌ക്രീനിന്റെ നിയന്ത്രണം പങ്കിടുക. @@ -95,15 +96,18 @@ % ശേഷിക്കുന്നു ഇൻപുട്ട് രീതികൾ -നുള്ളിൽ സെഷൻ അവസാനിക്കുന്നു. നിങ്ങൾ സൈൻ ഔട്ടാകും. +ഇതിലേക്ക് ഡെസ്‌ക്‌ടോപ്പ് കാസ്റ്റുചെയ്യുക % സ്‌പീക്കർ (ആന്തരികം) ഓൺ‌ സ്‌ക്രീൻ കീ‌ബോർഡ് പ്രവർത്തനക്ഷമമാക്കി +ഏകീകൃത ഡെസ്‌ക്‌ടോപ്പ് മോഡ് ഷെൽഫ് ഓണായിരിക്കുമ്പോൾ നിങ്ങളുടെ Chromebook ചാർജ് ചെയ്യാനിടയില്ല. ഔദ്യോഗിക ചാർജ്ജർ ഉപയോഗിക്കുന്നത് പരിഗണിക്കുക. അളവ് ലഭ്യമായ എല്ലാ ഉപയോക്താക്കളേയും ഈ സെഷനിൽ ഇതിനകം ചേർത്തു. തിരയൂ നെറ്റ്‌വർക്ക് വിവരം +റൊട്ടേഷൻ ലോക്ക് പ്രവർത്തനരഹിതമാക്കുക ബാറ്ററി ശൂന്യമാകുന്നതിന് ശേഷിക്കുന്ന സമയം, അതിഥി സെഷനിൽ നിന്നും പുറത്തുകടക്കുക മുൻ മെനു @@ -111,6 +115,7 @@ സ്‌ക്രീൻഷോട്ടുകൾ പ്രവർത്തനരഹിതമാക്കി ശരി മൊബൈൽ ... +റൊട്ടേഷൻ ലോക്ക് പ്രവർത്തനക്ഷമമാക്കുക ക്രമീകരണങ്ങള്‍ അപ്ലിക്കേഷനുകൾ സമന്വയിപ്പിക്കുന്നു... അക്കൗണ്ടുകൾ‌ @@ -121,6 +126,7 @@ "" എന്ന Bluetooth ഉപകരണം ജോടിയാക്കുന്നതിനുള്ള അനുമതി ആവശ്യപ്പെടുന്നു. Wi-Fi യാന്ത്രിക ക്ലിക്കുകൾ +കാസ്റ്റ് ഉപകരണങ്ങളൊന്നും ഇല്ല : കണക്റ്റുചെയ്യുന്നു... നിങ്ങൾ -നുള്ളിൽ യാന്ത്രികമായി സൈൻ ഔട്ട് ചെയ്യും. അജ്ഞാത പ്രദർശനം @@ -130,6 +136,7 @@ സ്‌റ്റാറ്റസ് ട്രേ, സമയം, , ലോക്കുചെയ്യുക ആപ്സ് +പുതിയ ലോഗിൻ UI ഓഫാണ് അടയ്ക്കുക അക്കൗണ്ടുകൾ നിയന്ത്രിക്കുക ക്യാമറ ഉപയോഗത്തിലാണ്. @@ -148,6 +155,7 @@ ഹെഡ്‌ഫോൺ ഉപകരണങ്ങൾക്കായി സ്‌കാൻ ചെയ്യുന്നു... , +പുതിയ ലോഗിൻ UI ഓണാണ് നിങ്ങളുടെ വിദൂര സഹായി മുഖേന സ്‌ക്രീനിന്റെ നിയന്ത്രണം പങ്കിടുക. മൈക്രോഫോൺ (ആന്തരികം) ഒരു പിശക് സംഭവിച്ചു @@ -200,6 +208,7 @@ ഔട്ട്പുട്ട് ലോഞ്ചർ (അപ്ലിക്കേഷൻ സമന്വയിപ്പിക്കുന്നു...) മറ്റുള്ളവ ചേർക്കുക... +ഡെസ്‌ക്‌ടോപ്പ് കാസ്റ്റുചെയ്യുന്നു : പൂർണ്ണമായും ചാർജാകുന്നതിന് മി shift diff --git a/ash/strings/ash_strings_mr.xtb b/ash/strings/ash_strings_mr.xtb index 9f994a1515b2b..d2d646460bfa7 100644 --- a/ash/strings/ash_strings_mr.xtb +++ b/ash/strings/ash_strings_mr.xtb @@ -72,6 +72,7 @@ CAPS LOCK सुरु आहे अंतर्गत डिस्प्ले आपली सेटिंग्ज समक्रमित केल्यानंतर भाषा "" मधून "" मध्ये बदलली आहे. +$1 कास्ट करीत आहे ब्रेल प्रदर्शन कनेक्ट केले. Wi-Fi चालू करा... दूरस्त सहाय्याद्वारे सह आपल्या स्क्रीनचे नियंत्रण सामायिक करत आहे. @@ -96,15 +97,18 @@ % उर्वरित इनपुट पद्धती मध्ये सत्र समाप्त होते. आपल्याला साइन आउट केले जाईल. +डेस्कटॉप यावर कास्ट करा % स्पीकर (अंतर्गत) ऑन-स्क्रीन कीबोर्ड सक्षम +एकीकृत डेस्कटॉप मोड शेल्फ आपले Chromebook चालू असताना ते चार्ज होऊ शकत नाही. अधिकृत चार्जर वापरण्याचा विचार करा. व्हॉल्यूम सर्व उपलब्‍ध वापरकर्ते आधीपासून या सत्रावर जोडले गेले आहेत. शोधा नेटवर्क माहिती +फिरविणे लॉक करा अक्षम करा बॅटरी रिक्त होईपर्यंत शिल्लक वेळ, अतिथी निर्गमन करा मागील मेनू @@ -112,6 +116,7 @@ स्क्रीनशॉट अक्षम केले उजवे मोबाइल ... +फिरविणे लॉक करा सक्षम करा सेटिंग्ज अ‍ॅप्स समक्रमित करत आहे... खाती @@ -122,6 +127,7 @@ "" Bluetooth डिव्हाइस जोडण्यासाठी परवानगी घेऊ इच्छिते. Wi-Fi स्वयंचलित क्लिक +कोणतेही कास्ट डिव्‍हाइसेस नाहीत : कनेक्ट करत आहे... आपल्याला मधून स्वयंचलितपणे साइन आउट केले जाईल. अज्ञात प्रदर्शन @@ -131,6 +137,7 @@ स्थिती ट्रे, वेळ , लॉक करा अनुप्रयोग +नवीन लॉग इन UI बंद आहे बंद करा खाती व्यवस्थापित करा कॅमेरा वापरात आहे. @@ -149,6 +156,7 @@ हेडफोन डिव्हाइसेससाठी स्कॅन करत आहे... , +नवीन लॉग इन UI चालू आहे दूरस्थ सहाय्याद्वारे आपल्या स्क्रीनचे नियंत्रण सामायिक करत आहे. मायक्रोफोन (अंतर्गत) एक त्रुटी आली आहे @@ -201,6 +209,7 @@ आउटपुट लाँचर (संकालन अॅप्स...) दुसरीकडे सामील व्हा... +डेस्कटॉप कास्ट करीत आहे : पूर्ण होईपर्यंत ता मि shift diff --git a/ash/strings/ash_strings_ms.xtb b/ash/strings/ash_strings_ms.xtb index 9854577799ab3..4b31bc02bcb80 100644 --- a/ash/strings/ash_strings_ms.xtb +++ b/ash/strings/ash_strings_ms.xtb @@ -72,6 +72,7 @@ Tekan Shift + Alt untuk menukar. Kekunci CAPS LOCK dihidupkan Paparan Dalaman Bahasa telah ditukar daripada "" kepada "" selepas menyegerakkan tetapan anda. +Menghantar $1 Paparan Braille disambungkan. Hidupkan Wi-Fi... Berkongsi kawalan skrin anda dengan melalui Bantuan Jauh. @@ -96,15 +97,18 @@ Tekan Shift + Alt untuk menukar. Tinggal % Kaedah input Sesi tamat dalam . Anda akan dilog keluar. +Hantar desktop ke % Pembesar Suara (Dalaman) Papan kekunci pada skrin didayakan +Mod desktop bersatu Rak Chromebook anda tidak boleh dicas semasa dihidupkan. Pertimbangkan untuk menggunakan pengecas rasmi. Kelantangan Semua pengguna yang ada telah ditambahkan pada sesi ini. Carian Maklumat Rangkaian +Lumpuhkan kunci putaran Masa yang tinggal sehingga bateri kosong, Keluar dari tetamu Menu sebelumnya @@ -112,6 +116,7 @@ Tekan Shift + Alt untuk menukar. Tangkapan skrin dilumpuhkan Kanan Mudah alih ... +Dayakan kunci putaran Tetapan Menyegerakkan aplikasi... Akaun @@ -122,6 +127,7 @@ Tekan Shift + Alt untuk menukar. Peranti Bluetooth "" ingin kebenaran untuk berpasangan. Wi-Fi Klik automatik +Tiada peranti cast : Menyambung... Anda akan dilog keluar secara automatik dalam masa . Paparan Tidak Diketahui @@ -131,6 +137,7 @@ Tekan Shift + Alt untuk menukar. Dulang status, masa , Kunci Apl +UI log masuk baharu DIMATIKAN Mematikan Urus akaun Kamera sedang digunakan. @@ -149,6 +156,7 @@ Tekan Shift + Alt untuk menukar. Fon kepala Mengimbas untuk peranti... , +UI log masuk baharu DIHIDUPKAN Berkongsi kawalan skrin anda melalui Bantuan Jauh. Mikrofon (Dalaman) Ralat berlaku @@ -201,6 +209,7 @@ Tekan Alt+Search atau Shift untuk membatalkan. Output Pelancar (menyegerakkan apl...) Sertai yang lain... +Menghantar desktop : j m sehingga penuh shift diff --git a/ash/strings/ash_strings_nl.xtb b/ash/strings/ash_strings_nl.xtb index 6d24b765b7f2a..573f083eee99f 100644 --- a/ash/strings/ash_strings_nl.xtb +++ b/ash/strings/ash_strings_nl.xtb @@ -72,6 +72,7 @@ Druk op Shift + Alt om te schakelen.j CAPS LOCK is ingeschakeld Interne display Na het synchroniseren met je instellingen, is de taal gewijzigd van '' in ''. +$1 casten Braillescherm gekoppeld. Wifi inschakelen... De controle over je scherm wordt gedeeld met via externe ondersteuning. @@ -96,9 +97,11 @@ Druk op Shift + Alt om te schakelen. % resterend Invoermethoden Sessie loopt af over . Je wordt uitgelogd. +Bureaublad casten naar % Luidspreker (intern) Schermtoetsenbord ingeschakeld +Samengestelde desktopmodus Plank Je Chromebook wordt mogelijk niet opgeladen wanneer deze is ingeschakeld. Overweeg het gebruik van een officiële lader. Volume @@ -124,6 +127,7 @@ Druk op Shift + Alt om te schakelen. Bluetooth-apparaat '' wil toestemming om te koppelen. Wifi Automatische klikken +Geen cast-apparaten : verbinden... Je wordt automatisch uitgelogd over . Onbekend display @@ -206,6 +210,7 @@ Druk op Alt+Zoeken of Shift om te annuleren. Uitgang Launcher (apps synchroniseren...) Verbinding met ander netwerk maken... +Bureaublad casten : u m tot volledig opgeladen shift diff --git a/ash/strings/ash_strings_no.xtb b/ash/strings/ash_strings_no.xtb index 111d73b4bbc88..d79c4b61f5d0d 100644 --- a/ash/strings/ash_strings_no.xtb +++ b/ash/strings/ash_strings_no.xtb @@ -23,7 +23,7 @@ Beregner batteritid. Nettverk Vis eller skjul vindusoversikten -Mellomtjener +Proxy-tjener Tastaturbelegg Skjermdelingen stopper hvis du bytter til en annen bruker. Google Disk @@ -73,6 +73,7 @@ Trykk på Shift + Alt for å bytte. Caps Lock er på Innebygd skjerm Språket er endret fra til etter synkronisering av innstillingene dine. +Caster $1 En leselist er tilkoblet. Slå på Wi-Fi Deler kontroll av skjermen med via fjernhjelp. @@ -97,15 +98,18 @@ Trykk på Shift + Alt for å bytte. % igjen Inndatametoder Økten slutter om . Du blir logget av automatisk. +Cast skrivebordet til % Mikrofon (intern) Skjermtastaturet er aktivert +Enhetlig skrivebordsmodus Hylle Chromebook kan ikke lades mens den er slått på. Vurder å bruke den offisielle laderen. Volum Alle tilgjengelige brukere er allerede lagt til i denne økten. Søk Nettverksinformasjon +Slå av rotasjonslås Gjenværende tid til batteriet er tomt – Avslutt gjesteøkten Forrige meny @@ -113,6 +117,7 @@ Trykk på Shift + Alt for å bytte. Skjermdumper er deaktivert Høyre Mobil +Slå på rotasjonslås Innstillinger Synkroniserer programmer … Kontoer @@ -123,6 +128,7 @@ Trykk på Shift + Alt for å bytte. Bluetooth-enheten «» ber om tillatelse til å koble til. Wi-Fi Automatiske klikk +Ingen Cast-enheter : kobler til ... Du logges automatisk av om . Ukjent skjerm @@ -132,6 +138,7 @@ Trykk på Shift + Alt for å bytte. Statusfelt, klokken , Lås Apper +Det nye påloggingsgrensesnittet er AV Avslutt Administrer kontoer Kameraet er i bruk. @@ -150,6 +157,7 @@ Trykk på Shift + Alt for å bytte. Hodetelefon Leter etter enheter ... +Det nye påloggingsgrensesnittet er PÅ Deler kontroll av skjermen via fjernhjelp. Mikrofon (intern) Det oppstod en feil @@ -202,6 +210,7 @@ Trykk på Alt + Søk eller Shift for å avbryte. Utdata Appoversikt (synkroniserer apper ...) Koble til annet +Caster skrivebordet : t og m til batteriet er ferdigladet shift diff --git a/ash/strings/ash_strings_pl.xtb b/ash/strings/ash_strings_pl.xtb index ce1514758f724..ebe7ddf530f11 100644 --- a/ash/strings/ash_strings_pl.xtb +++ b/ash/strings/ash_strings_pl.xtb @@ -72,6 +72,7 @@ Naciśnij Shift + Alt, by ją przełączyć. CAPS LOCK jest włączony. Wyświetlacz wewnętrzny Po zsynchronizowaniu ustawień zmieniono język z „” na „”. +Przesyłanie $1 Podłączono monitor brajlowski. Włącz Wi-Fi... Udostępnianie sterowania ekranem użytkownikowi przy użyciu pomocy zdalnej. @@ -96,15 +97,18 @@ Naciśnij Shift + Alt, by ją przełączyć. Pozostało % Wprowadzanie tekstu Sesja kończy się za . Zostaniesz wylogowany. +Prześlij pulpit na % Głośnik (wewnętrzny) Klawiatura ekranowa włączona +Tryb ujednoliconego pulpitu Półka Włączony Chromebook może nie być ładowany. Zalecamy użycie oryginalnej ładowarki. Głośność Wszyscy dostępni użytkownicy zostali już dodani do tej sesji. Szukaj Informacje o sieci +Wyłącz blokadę obracania Czas pozostały do wyczerpania baterii: Zakończ sesję gościa Poprzednie menu @@ -112,6 +116,7 @@ Naciśnij Shift + Alt, by ją przełączyć. Zrzuty ekranu wyłączone W prawo Komórkowe... +Włącz blokadę obracania Ustawienia Synchronizuję aplikacje... Konta @@ -122,6 +127,7 @@ Naciśnij Shift + Alt, by ją przełączyć. Urządzenie Bluetooth „” chce się sparować. Wi-Fi Automatyczne kliknięcia +Brak urządzeń przesyłających : łączę... Zostaniesz automatycznie wylogowany za . Nieznany wyświetlacz @@ -131,6 +137,7 @@ Naciśnij Shift + Alt, by ją przełączyć. Pasek stanu, godzina , Zablokuj Aplikacje +Nowy interfejs logowania jest WYŁĄCZONY Wyłącz Zarządzaj kontami Aparat jest używany. @@ -149,6 +156,7 @@ Naciśnij Shift + Alt, by ją przełączyć. Słuchawki Skanowanie w poszukiwaniu urządzeń... , +Nowy interfejs logowania jest WŁĄCZONY Udostępnianie sterowania ekranem przy użyciu pomocy zdalnej. Mikrofon (wewnętrzny) Wystąpił błąd @@ -202,6 +210,7 @@ Naciśnij Alt+Szukaj lub Shift, by anulować. Urządzenie wyjściowe Menu z aplikacjami (synchronizuję aplikacje...) Połącz z inną... +Przesyłanie pulpitu : godz. min do pełnego naładowania shift diff --git a/ash/strings/ash_strings_pt-BR.xtb b/ash/strings/ash_strings_pt-BR.xtb index e8429766fdd1c..25df827a6cbef 100644 --- a/ash/strings/ash_strings_pt-BR.xtb +++ b/ash/strings/ash_strings_pt-BR.xtb @@ -72,6 +72,7 @@ Pressione Shift + Alt para alternar. CAPS LOCK está ativado Display interno O idioma foi alterado de "" para "" após a sincronização de suas configurações. +Transmitindo $1 Display em braille conectado. Ativar Wi-Fi... Compartilhando o controle da sua tela com via Assistência remota. @@ -96,9 +97,11 @@ Pressione Shift + Alt para alternar. % restante Métodos de entrada A sessão termina em . Você será desconectado. +Transmitir área de trabalho para % Alto-falante (interno) Teclado na tela ativado +Modo de área de trabalho unificada. Estante Seu Chromebook pode não carregar enquanto estiver ligado. Considere usar o carregador oficial. Volume @@ -124,6 +127,7 @@ Pressione Shift + Alt para alternar. O dispositivo Bluetooth "" deseja permissão para realizar o pareamento. Wi-Fi Cliques automáticos +Nenhum dispositivo de transmissão : conectando... Você sairá automaticamente em . Exibição desconhecida @@ -205,6 +209,7 @@ Pressione Ctrl+Alt+Z para desativar. Saída Tela de início (sincronizando aplicativos...) Conectar-se a outra... +Transmitindo área de trabalho : hm até a carga total shift diff --git a/ash/strings/ash_strings_pt-PT.xtb b/ash/strings/ash_strings_pt-PT.xtb index 8f4283ee65f5a..3a7dbff3648af 100644 --- a/ash/strings/ash_strings_pt-PT.xtb +++ b/ash/strings/ash_strings_pt-PT.xtb @@ -72,6 +72,7 @@ Prima Shift + Alt para mudar. CAPS LOCK está ativado Ecrã interno O idioma foi alterado de para depois de sincronizar as suas definições. +A transmitir $1 Visualização em braille ligada. Ligar Wi-Fi... A partilhar o controlo do seu ecrã com através da Assistência remota. @@ -96,15 +97,18 @@ Prima Shift + Alt para mudar. % restante Métodos de introdução A sessão termina em . A sua sessão será terminada. +Transmitir ambiente de trabalho para % Altifalante (interno) Teclado no ecrã ativado +Modo de ambiente de trabalho unificado Prateleira É possível que não consiga carregar o seu Chromebook enquanto este se encontrar ligado. Considere utilizar o carregador oficial. Volume Já foram adicionados a esta sessão todos os utilizadores disponíveis. Pesquisar Informações da rede +Desativar o bloqueio de rotação Tempo restante até a bateria terminar, Sair da sessão de convidado Menu anterior @@ -112,6 +116,7 @@ Prima Shift + Alt para mudar. Capturas de ecrã desativadas Direita Telemóvel... +Ativar o bloqueio de rotação Definições A sincronizar aplicações... Contas @@ -122,6 +127,7 @@ Prima Shift + Alt para mudar. O dispositivo Bluetooth "" necessita de autorização para sincronizar. Wi-Fi Cliques automáticos +Sem dispositivos de transmissão : A ligar... A sessão será terminada automaticamente dentro de . Apresentação Desconhecida @@ -131,6 +137,7 @@ Prima Shift + Alt para mudar. Tabuleiro do estado, hora , Bloquear Aplicações +A IU de novo início de sessão está DESLIGADA Encerrar Gerir contas A câmara está a ser utilizada. @@ -149,6 +156,7 @@ Prima Shift + Alt para mudar. Auscultador A procurar dispositivos... , +A IU de novo início de sessão está LIGADA A partilhar o controlo do seu ecrã através da Assistência remota. Microfone (interno) Ocorreu um erro @@ -202,6 +210,7 @@ Prima Alt + Pesquisar ou Shift para cancelar. Saída Launcher (a sincronizar aplicações...) Ligar-se a outra... +A transmitir ambiente de trabalho : h m até ficar completa shift diff --git a/ash/strings/ash_strings_ro.xtb b/ash/strings/ash_strings_ro.xtb index d548496b06067..d6130423c4f0d 100644 --- a/ash/strings/ash_strings_ro.xtb +++ b/ash/strings/ash_strings_ro.xtb @@ -72,6 +72,7 @@ Tasta CAPS LOCK este activată Afișaj intern După sincronizarea setărilor, limba a fost modificată de la „” la „”. +Se proiectează $1 Afișajul Braille este conectat. Activați Wi-Fi... În prezent, îți poate controla ecranul prin Asistență la distanță. @@ -96,15 +97,18 @@ Nivel disponibil: % Metode de introducere Sesiunea se încheie peste . Veți fi deconectat(ă). +Proiectează desktopul pe % Difuzor (intern) Tastatură pe ecran activată +Modul Desktop unificat Raft Este posibil ca laptopul Chromebook să nu se încarce în timp ce este pornit. Se recomandă să utilizați încărcătorul original. Volum Toți utilizatorii disponibili au fost deja adăugați la această sesiune. Caută Informații despre rețea +Dezactivează blocarea rotirii Timp rămas până la descărcarea bateriei: Ieșiți din sesiunea pentru invitați Meniul anterior @@ -112,6 +116,7 @@ Capturile de ecran sunt dezactivate Dreapta Rețele mobile... +Activează blocarea rotirii Setări Se sincronizează aplicațiile... Conturi @@ -122,6 +127,7 @@ Dispozitivul Bluetooth „” solicită permisiunea de a se conecta. Wi-Fi Clicuri automate +Niciun dispozitiv de proiecție : se conectează... Veți fi deconectat(ă) automat peste . Afișaj necunoscut @@ -131,6 +137,7 @@ Bară de stare, durată , Blocați Aplicații +Noua interfață de conectare este DEZACTIVATĂ Închide Gestionați conturile Camera foto este în uz. @@ -149,6 +156,7 @@ Căști Se caută gadgeturi... , +Noua interfață de conectare este ACTIVATĂ În prezent, permiți controlul la ecran prin Asistență la distanță. Microfon (intern) A apărut o eroare @@ -202,6 +210,7 @@ Apăsați Alt+Căutare sau Shift pentru a anula. Ieșiri Lansator (se sincronizează aplicațiile...) Conectați-vă la altă rețea... +Se proiectează desktopul : h. min. până la încărcare completă shift diff --git a/ash/strings/ash_strings_ru.xtb b/ash/strings/ash_strings_ru.xtb index 549fc04b1a55e..02d8ff34c15f7 100644 --- a/ash/strings/ash_strings_ru.xtb +++ b/ash/strings/ash_strings_ru.xtb @@ -72,6 +72,7 @@ Включен режим CAPS LOCK Встроенный дисплей В результате синхронизации настроек язык изменен. Теперь используется , а не . +Трансляция: 1$ Брайлевский дисплей подключен Включение Wi-Fi... Доступ к экрану для с помощью удаленного помощника @@ -96,15 +97,18 @@ Осталось % Методы ввода Сеанс закончится через . После этого будет выполнен выход. +Транслировать содержимое рабочего стола на % Динамик (внутренний) Экранная клавиатура включена +Унифицированный режим рабочего стола Полка Возможны проблемы при зарядке Chromebook. Рекомендуем использовать комплектное зарядное устройство. Объем В этот сеанс уже добавлены все доступные пользователи. Поиск Информация о сети +Отключить автоповорот экрана Оставшееся время работы от батареи: . Выйти из гостевого режима Предыдущее меню @@ -112,6 +116,7 @@ Скриншоты отключены Вправо Мобильные сети… +Включить автоповорот экрана Настройки Синхронизация приложений… Аккаунты @@ -122,6 +127,7 @@ Устройству требуется разрешение на подключение через Bluetooth. Wi-Fi Автоматическое нажатие +Устройства трансляции не обнаружены : соединение... Выход из системы будет выполнен автоматически через . Неизвестный дисплей @@ -131,6 +137,7 @@ Строка состояния, время , Заблокировать Сервисы +Новое окно входа отключено Завершить работу Настроить аккаунты Камера используется. @@ -149,7 +156,8 @@ Наушники Поиск устройств… , -Доступ к экрану с помощь удаленного помощника +Новое окно входа включено +Доступ к экрану с помощью удаленного помощника Микрофон (внутренний) Произошел сбой. alt @@ -201,6 +209,7 @@ Выход Панель запуска (синхронизация приложений...) Подключиться к другой сети... +Транслировать содержимое рабочего стола : До полной зарядки: ч мин shift diff --git a/ash/strings/ash_strings_sk.xtb b/ash/strings/ash_strings_sk.xtb index 4606ba7796884..dddf051f2d2e3 100644 --- a/ash/strings/ash_strings_sk.xtb +++ b/ash/strings/ash_strings_sk.xtb @@ -72,6 +72,7 @@ Kláves CAPS LOCK je zapnutý Interný displej Po synchronizácii vašich nastavení bol zmenený jazyk „“ na jazyk „“. +Prenáša sa karta $1 Bola pripojená Braillova obrazovka. Zapnúť sieť Wi-Fi... Ovládanie obrazovky sa prostredníctvom Vzdialenej pomoci zdieľa s používateľom . @@ -96,9 +97,11 @@ Zostáva % Metódy vstupu Relácia sa skončí o . Následne budete odhlásený/-á. +Prenášať pracovnú plochu na % Reproduktor (vnútorný) Klávesnica na obrazovke je povolená +Režim zjednotenej pracovnej plochy Polička Chromebook sa nesmie dobíjať v čase, keď je zapnutý. Zvážte použitie oficiálnej nabíjačky. Hlasitosť @@ -124,6 +127,7 @@ Zariadenie Bluetooth s názvom žiada o povolenie párovania. Wi-Fi Automatické kliknutia +Žiadne zariadenia na prenos : pripája sa... Odhlásenie prebehne automaticky o . Neznáma obrazovka @@ -206,6 +210,7 @@ Ak ho chcete zrušiť, stlačte klávesy Alt + Hľadať alebo Shift.Výstup Spúšťač (synchronizujú sa aplikácie...) Pripojiť k ďalšej... +Prenáša sa pracovná plocha : h min do nabitia shift diff --git a/ash/strings/ash_strings_sl.xtb b/ash/strings/ash_strings_sl.xtb index 42810919b7ea8..b9c725ad1b652 100644 --- a/ash/strings/ash_strings_sl.xtb +++ b/ash/strings/ash_strings_sl.xtb @@ -72,6 +72,7 @@ Pritisnite Shift + Alt, da ga preklopite. Tipka CAPS LOCK je vklopljena Notranji zaslon Po sinhronizaciji nastavitev se je jezik spremenil iz jezika »« v jezik »«. +Predvajanje $1 Povezava z braillovo vrstico je vzpostavljena. Vklop omrežja Wi-Fi ... Deljenje nadzora nad zaslonom z osebo prek pomoči na daljavo. @@ -96,15 +97,18 @@ Pritisnite Shift + Alt, da ga preklopite. Preostane še % Načini vnosa Seja se konča čez . Odjavljeni boste. +Predvajanje namizja na % Zvočnik (vgrajeni) Zaslonska tipkovnica omogočena +Način enotnega namizja Polica Vaš Chromebook se ne more polniti, ko je vklopljen. Priporočamo uporabo uradnega polnilnika. Glasnost Vsi razpoložljivi uporabniki so že bili dodani tej seji. Išči Podatki o omrežju +Onemogočanje zaklepanja sukanja Preostali čas do izpraznitve akumulatorja, Zapusti sejo gosta Prejšnji meni @@ -112,6 +116,7 @@ Pritisnite Shift + Alt, da ga preklopite. Posnetki zaslona so onemogočeni V desno Mobilna ... +Omogočanje zaklepanja sukanja Nastavitve Sinhronizacija aplikacij ... Računi @@ -122,6 +127,7 @@ Pritisnite Shift + Alt, da ga preklopite. Naprava Bluetooth »« želi dovoljenje za seznanjanje. Wi-Fi Samodejni kliki +Ni naprav za predvajanje : vzpostavljanje povezave ... Samodejno boste odjavljeni čez . Neznan prikaz @@ -131,6 +137,7 @@ Pritisnite Shift + Alt, da ga preklopite. Vrstica stanja, čas: , Zakleni Aplikacije +Novi uporabniški vmesnik za prijavo je IZKLOPLJEN Zaustavitev Upravljanje računov Kamera je v uporabi. @@ -149,6 +156,7 @@ Pritisnite Shift + Alt, da ga preklopite. Slušalke Iskanje naprav ... , +Novi uporabniški vmesnik za prijavo je VKLOPLJEN Deljenje nadzora nad zaslonom prek pomoči na daljavo. Mikrofon (vgrajeni) Prišlo je do napake @@ -202,6 +210,7 @@ Pritisnite Alt in tipko za iskanje ali Shift, da jo prekličete. Izhod Zaganjalnik (sinhronizacija aplikacij ...) Pridružite se drugemu ... +Predvajanje namizja : h min do napolnjenosti shift diff --git a/ash/strings/ash_strings_sr.xtb b/ash/strings/ash_strings_sr.xtb index 86a8a1c7be1c3..c2cfee3a6b7a0 100644 --- a/ash/strings/ash_strings_sr.xtb +++ b/ash/strings/ash_strings_sr.xtb @@ -72,6 +72,7 @@ CAPS LOCK је укључен Интерни екран Језик је промењен са језика „“ на „“ након синхронизације подешавања. +Пребацујемо $1 Повезан је екран са Брајевом азбуком. Укључи Wi-Fi... Делите контролу над екраном са особом преко Даљинске помоћи. @@ -96,15 +97,18 @@ Преостало је % Методи уноса Сесија се завршава за . Бићете одјављени. +Пребацивање радне површине на % Звучник (интерни) Тастатура на екрану је омогућена +Режим спојених радних површина Полица Chromebook се можда неће пунити док је укључен. Размислите о коришћењу оригиналног пуњача. Јачина звука Сви доступни корисници су већ додати у ову сесију. Претражи Информације о мрежи +Онемогући закључавање ротације Време које је преостало док се батерија не испразни, Изађи из сесије госта Претходни мени @@ -112,6 +116,7 @@ Снимци екрана су онемогућени Удесно Мобилни ... +Омогући закључавање ротације Подешавања Синхронизовање апликација... Налози @@ -122,6 +127,7 @@ Bluetooth уређај „“ жели дозволу за упаривање. Wi-Fi Аутоматски кликови +Нема уређаја за пребацивање : Повезује се... Аутоматски ћете бити одјављени за . Непознати приказ @@ -131,6 +137,7 @@ Статусна трака, време , Закључај Апликације +Нови кориснички интерфејс за пријављивање је ИСКЉУЧЕН Искључи Управљај налозима Камера се користи. @@ -149,6 +156,7 @@ Слушалице Скенирање уређаја... +Нови кориснички интерфејс за пријављивање је УКЉУЧЕН Делите контролу над екраном преко Даљинске помоћи. Микрофон (интерни) Дошло је до грешке @@ -201,6 +209,7 @@ Излаз Покретач (апликације се синхронизују...) Придружи ме другој... +Пребацујемо радну површину : с м до краја пуњења shift diff --git a/ash/strings/ash_strings_sv.xtb b/ash/strings/ash_strings_sv.xtb index 89e4b6e7ec361..b8d83a1fe1ec2 100644 --- a/ash/strings/ash_strings_sv.xtb +++ b/ash/strings/ash_strings_sv.xtb @@ -72,6 +72,7 @@ CAPS LOCK är på Intern bildskärm Chromes språk har ändrats från till efter synkronisering av dina inställningar. +$1 castas Punktskriftsskärm ansluten. Aktivera Wi-Fi ... Dela kontroll över skärmen med via Fjärrhjälp. @@ -96,15 +97,18 @@ % återstår Inmatningsmetoder Sessionen upphör om . Du kommer att loggas ut. +Casta skrivbordet till % Högtalare (inbyggd) Skärmen på tangentbordet har aktiverats +Enhetligt skrivbordsläge Hylla Din Chromebook kanske inte laddas medan den är på. Överväg att använda den officiella laddaren. Volym Alla tillgängliga användare har redan lagts till i den här sessionen. Sök Nätverksinformation +Inaktivera rotationslås Tid som återstår tills batteriet är tomt: Avsluta gästsession Föregående meny @@ -112,6 +116,7 @@ Skärmdumpar har inaktiverats Höger Mobil ... +Aktivera rotationslås Inställningar Synkroniserar appar ... Konton @@ -122,6 +127,7 @@ Bluetooth-enheten har begärt tillstånd för koppling. Wi-Fi Automatiska klick +Inga överföringsenheter : ansluter ... Du loggas ut automatiskt om . Okänd visning @@ -131,6 +137,7 @@ Statusfältet, tid , Lås Appar +Det nya användargränssnittet för inloggning har inaktiverats Stäng av Hantera konton Kameran används. @@ -149,6 +156,7 @@ Hörlurar Söker efter enheter ... , +Det nya användargränssnittet för inloggning har aktiverats Dela kontroll över skärmen via Fjärrhjälp. Mikrofon (inbyggd) Det uppstod ett fel @@ -200,6 +208,7 @@ Inaktivera funktionen genom att trycka på Ctrl+Alt+Z. Utgång Översikt (appar synkroniseras …) Anslut till andra ... +Skrivbordet castas : h m till fulladdat skift diff --git a/ash/strings/ash_strings_sw.xtb b/ash/strings/ash_strings_sw.xtb index 17611272763f5..51b4bdc18cb25 100644 --- a/ash/strings/ash_strings_sw.xtb +++ b/ash/strings/ash_strings_sw.xtb @@ -72,6 +72,7 @@ Bonyeza Shift + Alt ili kubadilisha. Caps Lock imewashwa. Onyesho la Ndani Lugha imebadilika kutoka " "na kuwa" " baada ya kulinganisha mipangilio yako. +Inatuma $1 Onyesho la breli limeunganishwa. Washa Wi-Fi... Kushiriki udhibiti wa skrini yako na kupitia Usaidizi wa Mbali. @@ -96,9 +97,11 @@ Bonyeza Shift + Alt ili kubadili. % inayobaki Mbinu Ingizo Kipindi kitakwisha baada ya . Utaondolewa katika akaunti. +Tuma eneo-kazi kwenye % Spika (Ya ndani) Kibodi ya skrini imewashwa +Hali ya eneo-kazi iliyounganishwa Rafu Chromebook yako huenda isichaji ikiwa imewashwa. Fikiria kutumia chaja rasmi. Kiwango @@ -124,6 +127,7 @@ Bonyeza Shift + Alt ili kubadili. Kifaa cha Bluetooth cha "" kinaomba idhini ya kuoanisha. Wi-Fi Mibofyo ya kiotomatiki +Hakuna vifaa vinavyorusha midia : Inaunganisha... Utaondolewa kwenye akaunti kiotomatiki baada ya . Onyesho Lisilojulikana @@ -133,7 +137,7 @@ Bonyeza Shift + Alt ili kubadili. Treya ya hali, saa , Funga Programu -UI mpya ya kuingia katika akaunti IMEZIMWA +Kiolesura kipya cha kuingia katika akaunti KIMEZIMWA Zima Simamia akaunti Kamera inatumika. @@ -152,7 +156,7 @@ Bonyeza Shift + Alt ili kubadili. Vipokea sauti Inatambazaa vifaa... , -UI mpya ya kuingia katika akaunti IMEWASHWA +Kiolesura kipya cha kuingia katika akaunti KIMEWASHWA Kushiriki udhibiti wa skrini yako kupitia Usaidizi wa Mbali. Maikrofoni (Ya Ndani) Hitilafu fulani imetokea @@ -205,6 +209,7 @@ Bonyeza Alt + Utafutaji au Hama ili kughairi. Towe Kifungua programu (inasawazisha programu...) Jiunge na mwingine... +Inatuma eneo-kazi : Saa dakika ili ijae shift diff --git a/ash/strings/ash_strings_ta.xtb b/ash/strings/ash_strings_ta.xtb index 57440532bbe26..3d253fb44f649 100644 --- a/ash/strings/ash_strings_ta.xtb +++ b/ash/strings/ash_strings_ta.xtb @@ -72,6 +72,7 @@ CAPS LOCK இயக்கத்தில் இணையக் காட்சி உங்கள் அமைப்புகளை ஒத்திசைத்த பிறகு, மொழியானது "" இலிருந்து "" க்கு மாற்றப்பட்டுள்ளது. +$1ஐ அனுப்புகிறது பிரெய்ல் திரை இணைக்கப்பட்டது. வைஃபையை இயக்கு... தொலைநிலை உதவி மூலம் உடன் உங்கள் திரையின் கட்டுப்பாட்டைப் பகிர்கிறது. @@ -96,15 +97,18 @@ % மீதமுள்ளது உள்ளீட்டு முறைகள் இல் அமர்வு முடிந்துவிடும். வெளியேற்றப்படுவீர்கள். +இதற்கு டெஸ்க்டாப்பை அனுப்பு: % ஸ்பீக்கர் (உட்புறம்) ஆன்ஸ்க்ரீன் விசைப்பலகை இயக்கப்பட்டது +ஒன்றிணைந்த டெஸ்க்டாப் பயன்முறை அடுக்கு உங்கள் Chromebook இயக்கத்தில் இருக்கும்போது சார்ஜ் செய்ய முடியாது. அதிகாரப்பூர்வ சார்ஜரைப் பயன்படுத்தவும். அளவு எல்லா பயனர்களும் ஏற்கனவே இந்த அமர்வில் சேர்க்கப்பட்டுள்ளனர். தேடல் பிணைய தகவல் +சுழற்றல் பூட்டை முடக்கு இன்னும் இல் பேட்டரி காலியாகிவிடும் விருந்தினரிலிருந்து வெளியேறவும் முந்தைய மெனு @@ -112,6 +116,7 @@ ஸ்கிரீன்ஷாட்கள் முடக்கப்பட்டன வலது மொபைல் ... +சுழற்றல் பூட்டை இயக்கு அமைப்புகள் பயன்பாடுகளை ஒத்திசைக்கிறது... கணக்குகள் @@ -122,6 +127,7 @@ புளூடூத் சாதனம் "", இணைப்பதற்கான அனுமதியை விரும்புகிறது. வைஃபை தன்னியக்க கிளிக்குகள் +அனுப்பும் சாதனங்கள் இல்லை : இணைக்கிறது... இல் தானாகவே வெளியேற்றப்படுவீர்கள். அறியாதது @@ -131,6 +137,7 @@ நிலைத் தட்டு, நேரம் , பூட்டு ஆப்ஸ் +புதிய உள்நுழைவு UI முடக்கப்பட்டது நிறுத்து கணக்குகளை நிர்வகி கேமரா பயன்பாட்டில் உள்ளது. @@ -149,6 +156,7 @@ ஹெட்ஃபோன் சாதனங்களைக் கண்டறிகிறது... , +புதிய உள்நுழைவு UI இயக்கப்பட்டது தொலைநிலை உதவி மூலம் உங்கள் திரையின் கட்டுப்பாட்டைப் பகிர்கிறது. மைக்ரோஃபோன் (உட்புறம்) ஒரு பிழை ஏற்பட்டது @@ -202,6 +210,7 @@ வெளியீடு துவக்கி (பயன்பாடுகளை ஒத்திசைக்கிறது...) மற்றொன்றில் சேர்... +டெஸ்க்டாப்பை அனுப்புகிறது : முழுவதும் சார்ஜ் ஆகும் நேரம் - நி shift diff --git a/ash/strings/ash_strings_te.xtb b/ash/strings/ash_strings_te.xtb index 66b80920fa669..7bd6533dcb077 100644 --- a/ash/strings/ash_strings_te.xtb +++ b/ash/strings/ash_strings_te.xtb @@ -72,6 +72,7 @@ CAPS LOCK ఆన్‌లో ఉంది అంతర్గత ప్రదర్శన మీ సెట్టింగ్‌లను సమకాలీకరించిన తర్వాత Chrome యొక్క భాష "" నుండి ""కి మార్చబడింది. +$1ని ప్రసారం చేస్తున్నాము బ్రెయిలీ డిస్‌ప్లే కనెక్ట్ చేయబడింది. Wi-Fiని ప్రారంభించు... రిమోట్ సహాయం విధానంలో మీ స్క్రీన్ నియంత్రణ కి భాగస్వామ్యం చేయబడుతోంది. @@ -96,15 +97,18 @@ % మిగిలి ఉంది ఇన్‌పుట్ పద్ధతులు సెషన్ లో ముగుస్తుంది. మీరు సైన్ అవుట్ చేయబడతారు. +డెస్క్‌టాప్‌ను దీనికి/వీటికి ప్రసారం చేయవచ్చు % స్పీకర్ (అంతర్గతం) స్క్రీన్‌పై కనిపించే కీబోర్డ్ ప్రారంభించబడింది +ఏకీకృత డెస్క్‌టాప్ మోడ్ అర మీ Chromebook ప్రారంభించబడినప్పుడు ఛార్జ్ కాకపోవచ్చు. అధికారిక ఛార్జర్‌ను ఉపయోగించడానికి ప్రయత్నించండి. వాల్యూమ్ అందుబాటులో ఉన్న వినియోగదారులందరూ ఇప్పటికే ఈ సెషన్‌కు జోడించబడ్డారు. శోధించు నెట్‌వర్క్ సమాచారం +రొటేషన్ లాక్‌ను నిలిపివేయండి బ్యాటరీ ఖాళీ కావడానికి మిగిలి ఉన్న సమయం, అతిథిగా నిష్క్రమించు మునుపటి మెను @@ -112,6 +116,7 @@ స్క్రీన్‌షాట్‌లు నిలిపివేయబడ్డాయి కుడి మొబైల్ ... +రొటేషన్ లాక్‌ను ప్రారంభించండి సెట్టింగ్‌లు అనువర్తనాలను సమకాలీకరిస్తోంది... ఖాతాలు @@ -122,6 +127,7 @@ బ్లూటూత్ పరికరం "" జత కావడానికి అనుమతి కోరుతోంది. Wi-Fi స్వయంచాలక క్లిక్‌లు +ప్రసార పరికరాలు లేవు : కనెక్ట్ అవుతోంది... మీరు లో స్వయంచాలకంగా సైన్ అవుట్ చేయబడతారు. తెలియని ప్రదర్శన @@ -131,6 +137,7 @@ స్థితి ట్రే, సమయం , లాక్ చేయి యాప్స్ +కొత్త లాగిన్ UI ఆఫ్‌లో ఉంది షట్ డౌన్ చెయ్యండి ఖాతాలను నిర్వహించు కెమెరా ఉపయోగంలో ఉంది. @@ -149,6 +156,7 @@ హెడ్‌ఫోన్ పరికరాల కోసం స్కాన్ చేస్తోంది... , +కొత్త లాగిన్ UI ఆన్‌లో ఉంది రిమోట్ సహాయం విధానంలో మీ స్క్రీన్ నియంత్రణను భాగస్వామ్యం చేస్తోంది. మైక్రోఫోన్ (అంతర్గతం) ఒక లోపం సంభవించింది @@ -202,6 +210,7 @@ అవుట్‌పుట్ లాంచర్ (అనువర్తనాలను సమకాలీకరిస్తోంది...) మరొక దానిలో చేరండి... +డెస్క్‌టాప్‌ను ప్రసారం చేస్తున్నాము : నిండే వరకు h m అవుతుంది shift diff --git a/ash/strings/ash_strings_th.xtb b/ash/strings/ash_strings_th.xtb index 692954d9ef095..b2e8b567090f0 100644 --- a/ash/strings/ash_strings_th.xtb +++ b/ash/strings/ash_strings_th.xtb @@ -72,6 +72,7 @@ Caps Lock เปิดอยู่ จอแสดงผลภายใน เปลี่ยนภาษาจาก "" เป็น "" หลังจากซิงค์การตั้งค่าของคุณ +กำลังแคสต์ $1 เชื่อมต่ออุปกรณ์แสดงผลอักษรเบรลล์แล้ว เปิด WiFi... กำลังแชร์การควบคุมหน้าจอกับ ผ่านความช่วยเหลือระยะไกล @@ -96,15 +97,18 @@ เหลืออีก % วิธีการป้อนข้อมูล เซสชันจะสิ้นสุดใน ระบบจะให้คุณออกจากระบบ +แคสต์เดสก์ท็อปไปที่ % ลำโพง (ภายใน) เปิดใช้แป้นพิมพ์บนหน้าจออยู่ +โหมดเดสก์ท็อปแบบรวม ชั้นวาง Chromebook ของคุณอาจไม่ได้ชาร์จในขณะที่เปิดอยู่ ลองใช้ที่ชาร์จมาตรฐาน ระดับเสียง เพิ่มผู้ใช้ที่มีทั้งหมดลงในเซสชันนี้แล้ว ค้นหา ข้อมูลเครือข่าย +ปิดใช้ล็อกการหมุน เวลาที่เหลือกว่าแบตเตอรี่จะหมด, ออกจากเซสชันผู้มาเยือน เมนูก่อนหน้า @@ -112,6 +116,7 @@ ปิดใช้การจับภาพหน้าจอ ขวา มือถือ ... +เปิดใช้ล็อกการหมุน การตั้งค่า กำลังซิงค์แอปพลิเคชัน... บัญชี @@ -122,6 +127,7 @@ อุปกรณ์บลูทูธ "" ต้องการสิทธิ์ในการจับคู่ Wi-Fi การคลิกอัตโนมัติ +ไม่มีอุปกรณ์แคสต์ : กำลังเชื่อมต่อ... คุณจะออกจากระบบโดยอัตโนมัติใน หน้าจอที่ไม่รู้จัก @@ -131,6 +137,7 @@ ถาดสถานะ เวลา , ล็อก แอป +UI การเข้าสู่ระบบแบบใหม่ปิดอยู่ ปิด จัดการบัญชี ใช้กล้องถ่ายรูปอยู่ @@ -149,6 +156,7 @@ ชุดหูฟัง กำลังสแกนหาอุปกรณ์... , +UI การเข้าสู่ระบบแบบใหม่เปิดอยู่ กำลังแชร์การควบคุมหน้าจอผ่านความช่วยเหลือระยะไกล ไมโครโฟน (ภายใน) มีข้อผิดพลาดเกิดขึ้น @@ -202,6 +210,7 @@ เอาต์พุต Launcher (กำลังซิงค์แอป...) เชื่อมต่อเครือข่ายอื่น... +กำลังแคสต์เดสก์ท็อป : อีก ชม. นาทีจึงจะเต็ม shift diff --git a/ash/strings/ash_strings_tr.xtb b/ash/strings/ash_strings_tr.xtb index 0420b7d1b6b13..1f5f3f3d537e0 100644 --- a/ash/strings/ash_strings_tr.xtb +++ b/ash/strings/ash_strings_tr.xtb @@ -72,6 +72,7 @@ Geçiş yapmak için ÜstKrktr + Alt tuşlarına basın. CAPS LOCK açık Dahili Ekran Ayarlarınız senkronize edildikten sonra "" olan dil "" olarak değiştirildi. +$1 yayınlanıyor Braille ekranı bağlandı. Kablosuz'u aç... Ekranınızın kontrolü, Uzaktan Yardım kullanılarak ile paylaşılıyor. @@ -96,15 +97,18 @@ Geçiş yapmak için ÜstKrktr + Alt tuşlarına basın. % kaldı Giriş yöntemleri Oturumun süresi içinde bitiyor. Süre dolduğunda oturumunuz kapatılacaktır. +Masaüstünü şuraya yayınla: % Hoparlör (Dahili) Dokunmatik klavye etkin +Birleştirilmiş masaüstü modu Raf Chromebook'unuz açıkken şarj edilemeyebilir. Orijinal şarj cihazını kullanmayı düşünün. Ses Mevcut tüm kullanıcılar zaten bu oturuma eklenmiş. Ara Ağ Bilgisi +Döndürme kilidini devre dışı bırak Pilin boşalması için kalan süre, Misafir oturumundan çık Önceki menü @@ -112,6 +116,7 @@ Geçiş yapmak için ÜstKrktr + Alt tuşlarına basın. Ekran görüntüleri devre dışı Sağa Mobile... +Döndürme kilidini etkinleştir Ayarlar Uygulamalar senkronize ediliyor... Hesaplar @@ -122,6 +127,7 @@ Geçiş yapmak için ÜstKrktr + Alt tuşlarına basın. "" adlı Bluetooth cihaz eşleme izni istiyor. Kablosuz Otomatik tıklamalar +Yayın cihazı yok : Bağlanıyor... içinde otomatik olarak çıkış yapacaksınız. Bilinmeyen Görünüm @@ -131,6 +137,7 @@ Geçiş yapmak için ÜstKrktr + Alt tuşlarına basın. Durum tepsisi, saat: , Kilitle Uygulamalar +Yeni giriş kullanıcı arayüzü KAPALI Kapat Hesapları yönet Kamera kullanımda. @@ -149,6 +156,7 @@ Geçiş yapmak için ÜstKrktr + Alt tuşlarına basın. Kulaklık Cihazlar taranıyor... , +Yeni giriş kullanıcı arayüzü AÇIK Ekranınızın kontrolü Uzaktan Yardım kullanılarak paylaşılıyor. Mikrofon (Dahili) Bir hata oluştu @@ -203,6 +211,7 @@ Devre dışı bırakmak için Ctrl+Alt+Z tuşlarına basın. Çıkış Launcher (uygulamalar senkronize ediliyor...) Başka ağa katıl... +Masaüstü yayınlanıyor : Tam dolana kadar sa dk var üstkrktr diff --git a/ash/strings/ash_strings_uk.xtb b/ash/strings/ash_strings_uk.xtb index 042af0231fa6d..674eaa5f94bb4 100644 --- a/ash/strings/ash_strings_uk.xtb +++ b/ash/strings/ash_strings_uk.xtb @@ -72,6 +72,7 @@ Режим CAPS LOCK увімкнено Внутрішній екран Після синхронізації налаштувань мову змінено. Попередня: , нова: . +Транслюється $1 Брайлівський дисплей під’єднано. Увімкнення Wi-Fi… Спільний доступ до екрана для користувача через віддалену допомогу. @@ -96,9 +97,11 @@ Залишилося % Методи введення Сеанс закінчиться через . Ви вийдете. +Транслювати робочий стіл на пристрій % Динамік (внутрішній) Екранну клавіатуру ввімкнено +Режим уніфікованого комп’ютера Полиця Ваш Chromebook може не заряджатися, якщо ввімкнений. Спробуйте скористатися офіційним зарядним пристроєм. Гучність @@ -124,6 +127,7 @@ Пристрою Bluetooth "" потрібен дозвіл на підключення. Wi-Fi Автоматичні кліки +Немає пристроїв для трансляції : Під’єднання… Ви автоматично вийдете за . Невідомий дисплей @@ -206,6 +210,7 @@ Вихід Панель запуску (синхронізація додатків…) Під’єднатися до іншої... +Трансляція робочого стола : год. хв. до повного зарядження shift diff --git a/ash/strings/ash_strings_vi.xtb b/ash/strings/ash_strings_vi.xtb index ffaed93d174d5..7ab8fb1d532f7 100644 --- a/ash/strings/ash_strings_vi.xtb +++ b/ash/strings/ash_strings_vi.xtb @@ -72,6 +72,7 @@ Nhấn Shift + Alt để chuyển đổi. Đang bật CAPS LOCK Màn hình nội bộ Ngôn ngữ đã chuyển từ "" thành "" sau khi đồng bộ hóa cài đặt của bạn. +Đang truyền $1 Đã kết nối màn hình Braille. Bật Wi-Fi... Chia sẻ quyền kiểm soát màn hình của bạn với qua Trợ giúp từ xa. @@ -96,9 +97,11 @@ Nhấn Shift + Alt để chuyển đổi. Còn lại % Phương thức nhập Phiên sẽ kết thúc sau . Bạn sẽ bị đăng xuất. +Truyền màn hình % Loa (Bên trong) Đã bật bàn phím ảo +Chế độ màn hình đồng nhất Giá Chromebook của bạn có thể không sạc khi đang bật. Hãy xem xét sử dụng bộ sạc chính thức. Âm lượng @@ -124,6 +127,7 @@ Nhấn Shift + Alt để chuyển đổi. Thiết bị Bluetooth ""muốn được phép ghép nối. Wi-Fi Nhấp chuột tự động +Không có thiết bị truyền nào : Đang kết nối... Bạn sẽ tự động được đăng xuất sau . Màn hình không xác định @@ -206,6 +210,7 @@ Nhấn Alt+Search hoặc Shift để hủy. Thiết bị ra Trình khởi chạy (đang đồng bộ hóa ứng dụng...) Tham gia mạng khác... +Đang truyền màn hình : g p cho đến khi đầy shift diff --git a/ash/strings/ash_strings_zh-CN.xtb b/ash/strings/ash_strings_zh-CN.xtb index 2d6e59b10f95b..e60146bc590c9 100644 --- a/ash/strings/ash_strings_zh-CN.xtb +++ b/ash/strings/ash_strings_zh-CN.xtb @@ -72,6 +72,7 @@ CAPS LOCK 已打开 内部显示 同步了您的设置后,该语言已由“”更改为“”。 +正在投射“$1” 已连接盲文显示屏。 启用 Wi-Fi... 正在通过远程协助与共享您屏幕的控制权限。 @@ -96,15 +97,18 @@ 剩余电量:% 输入法 会话将在后结束,到时您将自动退出。 +将桌面投射至 % 扬声器(内部) 屏幕键盘已启用 +统一桌面模式 文件架 您的 Chromebook 在开启期间可能无法充电。建议您使用产品原装的充电器。 音量 所有可参加的用户均已添加到此会话中。 搜索 网络信息 +停用旋转锁定 电池电量将在 后耗尽 退出访客模式 上一菜单 @@ -112,6 +116,7 @@ 已停用屏幕截图 向右 移动... +启用旋转锁定 设置 正在同步应用... 帐户 @@ -122,6 +127,7 @@ 蓝牙设备“”需要配对许可。 Wi-Fi 自动点击 +无任何投射设备 :正在连接... 您将在后自动退出。 未知展示广告 @@ -131,6 +137,7 @@ 状态栏,时间为 锁定 应用 +新版登录界面处于停用状态 关闭 管理帐户 摄像头处于使用状态。 @@ -149,6 +156,7 @@ 耳机 正在查找设备... +新版登录界面处于启用状态 正在通过远程协助共享您屏幕的控制权限。 麦克风(内部) 出现错误 @@ -202,6 +210,7 @@ 输出 启动器(正在同步应用…) 连接其他网络... +正在投射桌面 还需要 小时 分钟才能充满电 shift diff --git a/ash/strings/ash_strings_zh-TW.xtb b/ash/strings/ash_strings_zh-TW.xtb index 16dd62e667105..c2ea7b695e031 100644 --- a/ash/strings/ash_strings_zh-TW.xtb +++ b/ash/strings/ash_strings_zh-TW.xtb @@ -72,6 +72,7 @@ 大寫鍵已啟用 內部畫面 同步處理您的設定後,系統已將語言從「」變更為「」。 +正在投放「$1」 已連接點字顯示器。 開啟 Wi-Fi... 透過遠端協助與分享螢幕控制功能。 @@ -96,15 +97,18 @@ 剩餘電量:% 輸入法 這個工作階段將在 後結束,屆時系統會將您登出。 +將桌面投放至 % 喇叭 (內部) 螢幕小鍵盤已啟用 +整合桌面模式 檔案櫃 您的 Chromebook 可能無法在開機時充電。建議您使用官方提供的充電器。 音量 現有使用者已全部加入這個工作階段。 搜尋 網路資訊 +停用旋轉鎖定 電池剩餘使用時間: 結束訪客工作階段 前一個選單 @@ -112,6 +116,7 @@ 已停用螢幕擷取畫面 向右 行動服務 ... +啟用旋轉鎖定 設定 正在同步處理應用程式... 帳戶 @@ -122,6 +127,7 @@ 藍牙裝置「」要求配對權限。 Wi-Fi 自動點擊 +沒有投放裝置 :正在連線... 您將於 後自動登出。 顯示器不明 @@ -131,6 +137,7 @@ 狀態匣:時間 鎖定 應用程式 +新版登入使用者介面已「關閉」 關閉 管理帳戶 攝影機正在使用中。 @@ -149,6 +156,7 @@ 耳機 正在掃描裝置... +新版登入使用者介面已「開啟」 透過遠端協助分享螢幕控制功能。 麥克風 (內部) 發生錯誤 @@ -202,6 +210,7 @@ 輸出 啟動器 (正在同步處理應用程式...) 加入其他網路... +正在投放桌面 尚需 小時 分鐘才能充滿電 Shift diff --git a/ash/system/chromeos/tray_display.cc b/ash/system/chromeos/tray_display.cc index 7074c58343489..a5907f9a323c5 100644 --- a/ash/system/chromeos/tray_display.cc +++ b/ash/system/chromeos/tray_display.cc @@ -92,7 +92,8 @@ base::string16 GetAllDisplayInfo() { std::vector lines; int64 internal_id = gfx::Display::kInvalidDisplayID; // Make sure to show the internal display first. - if (gfx::Display::HasInternalDisplay() && + if (!display_manager->IsInUnifiedMode() && + gfx::Display::HasInternalDisplay() && gfx::Display::InternalDisplayId() == display_manager->first_display_id()) { internal_id = display_manager->first_display_id(); diff --git a/ash/system/chromeos/tray_display_unittest.cc b/ash/system/chromeos/tray_display_unittest.cc index 32c8182dfe5c5..c682c48ebf5ea 100644 --- a/ash/system/chromeos/tray_display_unittest.cc +++ b/ash/system/chromeos/tray_display_unittest.cc @@ -10,6 +10,7 @@ #include "ash/shell.h" #include "ash/system/tray/system_tray.h" #include "ash/test/ash_test_base.h" +#include "ash/test/display_manager_test_api.h" #include "ash/test/test_system_tray_delegate.h" #include "base/strings/string16.h" #include "base/strings/string_util.h" @@ -313,6 +314,7 @@ TEST_F(TrayDisplayTest, InternalDisplayResized) { CheckAccessibleName(); // Unified mode + test::DisplayManagerTestApi::EnableUnifiedDesktopForTest(); display_manager->SetDefaultMultiDisplayMode(DisplayManager::UNIFIED); display_manager->SetMultiDisplayMode(DisplayManager::UNIFIED); UpdateDisplay("300x200,400x500"); diff --git a/ash/test/display_manager_test_api.cc b/ash/test/display_manager_test_api.cc index a52ec03f3e7fd..7627289c23064 100644 --- a/ash/test/display_manager_test_api.cc +++ b/ash/test/display_manager_test_api.cc @@ -6,13 +6,16 @@ #include +#include "ash/ash_switches.h" #include "ash/display/display_info.h" +#include "ash/display/display_layout_store.h" #include "ash/display/display_manager.h" #include "ash/display/display_util.h" #include "ash/display/extended_mouse_warp_controller.h" #include "ash/display/mouse_cursor_event_filter.h" #include "ash/display/unified_mouse_warp_controller.h" #include "ash/shell.h" +#include "base/command_line.h" #include "base/strings/string_split.h" #include "ui/aura/env.h" #include "ui/aura/window_event_dispatcher.h" @@ -92,6 +95,18 @@ bool DisplayManagerTestApi::TestIfMouseWarpsAt( } } +// static +void DisplayManagerTestApi::EnableUnifiedDesktopForTest() { +#if defined(OS_CHROMEOS) + base::CommandLine::ForCurrentProcess()->AppendSwitch( + switches::kAshEnableUnifiedDesktop); + Shell::GetInstance() + ->display_manager() + ->layout_store() + ->SetDefaultDisplayLayout(DisplayLayout()); +#endif +} + DisplayManagerTestApi::DisplayManagerTestApi(DisplayManager* display_manager) : display_manager_(display_manager) {} diff --git a/ash/test/display_manager_test_api.h b/ash/test/display_manager_test_api.h index afbfd43118d9d..6173655d20702 100644 --- a/ash/test/display_manager_test_api.h +++ b/ash/test/display_manager_test_api.h @@ -33,6 +33,8 @@ class DisplayManagerTestApi { static bool TestIfMouseWarpsAt(ui::test::EventGenerator& event_generator, const gfx::Point& point_in_screen); + static void EnableUnifiedDesktopForTest(); + explicit DisplayManagerTestApi(DisplayManager* display_manager); virtual ~DisplayManagerTestApi(); diff --git a/ash/test/mirror_window_test_api.cc b/ash/test/mirror_window_test_api.cc index 30e5624d64ab0..a66417a72e0cc 100644 --- a/ash/test/mirror_window_test_api.cc +++ b/ash/test/mirror_window_test_api.cc @@ -7,6 +7,7 @@ #include "ash/display/cursor_window_controller.h" #include "ash/display/display_controller.h" #include "ash/display/mirror_window_controller.h" +#include "ash/display/root_window_transformers.h" #include "ash/host/root_window_transformer.h" #include "ash/shell.h" #include "ui/gfx/geometry/point.h" @@ -49,11 +50,5 @@ gfx::Point MirrorWindowTestApi::GetCursorLocation() const { return point; } -scoped_ptr -MirrorWindowTestApi::CreateCurrentRootWindowTransformer() const { - return Shell::GetInstance()->display_controller()-> - mirror_window_controller()->CreateRootWindowTransformer(); -} - } // namespace test } // namespace ash diff --git a/ash/test/mirror_window_test_api.h b/ash/test/mirror_window_test_api.h index 1dd73aa1e4365..9c62d2a58b86d 100644 --- a/ash/test/mirror_window_test_api.h +++ b/ash/test/mirror_window_test_api.h @@ -42,8 +42,6 @@ class MirrorWindowTestApi { const aura::Window* GetCursorWindow() const; gfx::Point GetCursorLocation() const; - scoped_ptr CreateCurrentRootWindowTransformer() const; - private: DISALLOW_COPY_AND_ASSIGN(MirrorWindowTestApi); }; diff --git a/base/BUILD.gn b/base/BUILD.gn index de282cfe35d6f..e77699f7fd4b4 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -1367,7 +1367,7 @@ test("base_unittests") { } } - if (!is_linux || use_ozone) { + if (!is_linux) { sources -= [ "message_loop/message_pump_glib_unittest.cc" ] } diff --git a/base/android/build_info.h b/base/android/build_info.h index d6155b9eed953..e694dba34d6dc 100644 --- a/base/android/build_info.h +++ b/base/android/build_info.h @@ -18,6 +18,8 @@ namespace android { // This enumeration maps to the values returned by BuildInfo::sdk_int(), // indicating the Android release associated with a given SDK version. enum SdkVersion { + SDK_VERSION_ICE_CREAM_SANDWICH = 14, + SDK_VERSION_ICE_CREAM_SANDWICH_MR1 = 15, SDK_VERSION_JELLY_BEAN = 16, SDK_VERSION_JELLY_BEAN_MR1 = 17, SDK_VERSION_JELLY_BEAN_MR2 = 18, diff --git a/base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java b/base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java index ad5cdd815bfcf..d4b0d98d19dd7 100644 --- a/base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java +++ b/base/android/java/src/org/chromium/base/AnimationFrameTimeHistogram.java @@ -9,6 +9,8 @@ import android.animation.AnimatorListenerAdapter; import android.animation.TimeAnimator; import android.animation.TimeAnimator.TimeListener; +import android.annotation.TargetApi; +import android.os.Build; import android.util.Log; /** @@ -80,6 +82,9 @@ public void endRecording() { /** * Record Android animation frame rate and return the result. */ + // Note: TimeAnimator was added to the Android public API in level 16, but has actually been + // available since level 14. So, it's safe to use TimeAnimator here, even on ICS. + @TargetApi(Build.VERSION_CODES.JELLY_BEAN) private static class Recorder implements TimeListener { // TODO(kkimlabs): If we can use in the future, migrate to Choreographer for minimal // workload. diff --git a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java index 76d73967d49c8..64180b33b2de6 100644 --- a/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java +++ b/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java @@ -4,9 +4,11 @@ package org.chromium.base; +import android.animation.ValueAnimator; import android.annotation.TargetApi; import android.app.Activity; import android.app.ActivityManager; +import android.app.ActivityOptions; import android.app.PendingIntent; import android.content.ContentResolver; import android.content.Context; @@ -18,12 +20,16 @@ import android.graphics.Color; import android.graphics.drawable.Drawable; import android.os.Build; +import android.os.Bundle; import android.os.PowerManager; import android.provider.Settings; import android.view.View; import android.view.ViewGroup.MarginLayoutParams; +import android.view.ViewTreeObserver; import android.view.Window; import android.view.WindowManager; +import android.widget.ImageView; +import android.widget.RemoteViews; import android.widget.TextView; /** @@ -235,8 +241,121 @@ public static void setCompoundDrawablesRelativeWithIntrinsicBounds(TextView text } } + /** + * @see android.view.View#postInvalidateOnAnimation() + */ + public static void postInvalidateOnAnimation(View view) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { + view.postInvalidateOnAnimation(); + } else { + view.postInvalidate(); + } + } + + /** + * @see android.view.View#postOnAnimation() + */ + public static void postOnAnimation(View view, Runnable action) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { + view.postOnAnimation(action); + } else { + view.postDelayed(action, getFrameTime()); + } + } + + /** + * @see android.view.View#postOnAnimationDelayed() + */ + public static void postOnAnimationDelayed(View view, Runnable action, long delayMillis) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { + view.postOnAnimationDelayed(action, delayMillis); + } else { + view.postDelayed(action, getFrameTime() + delayMillis); + } + } + + private static long getFrameTime() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { + return ValueAnimator.getFrameDelay(); + } else { + // Any reasonable fake frame delay will have to do. + return 10; + } + } + + /** + * @see android.widget.RemoteViews#setContentDescription(int, CharSequence) + */ + public static void setContentDescriptionForRemoteView(RemoteViews remoteViews, int viewId, + CharSequence contentDescription) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { + remoteViews.setContentDescription(viewId, contentDescription); + } else { + // setContentDescription() is unavailable in earlier versions. + } + } + + /** + * @see android.app.Activity#startActivity(Intent, Bundle) + */ + public static void startActivity(Context context, Intent intent, Bundle options) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { + context.startActivity(intent, options); + } else { + context.startActivity(intent); + } + } + + /** + * @see android.app.ActivityOptions#toBundle() + */ + public static Bundle toBundle(ActivityOptions options) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { + return options.toBundle(); + } else { + return null; + } + } + // These methods have a new name, and the old name is deprecated. + /** + * @see android.view.View#setBackground(Drawable) + */ + @SuppressWarnings("deprecation") + public static void setBackgroundForView(View view, Drawable drawable) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { + view.setBackground(drawable); + } else { + view.setBackgroundDrawable(drawable); + } + } + + /** + * @see android.view.ViewTreeObserver#removeOnGlobalLayoutListener() + */ + @SuppressWarnings("deprecation") + public static void removeOnGlobalLayoutListener( + View view, ViewTreeObserver.OnGlobalLayoutListener listener) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { + view.getViewTreeObserver().removeOnGlobalLayoutListener(listener); + } else { + view.getViewTreeObserver().removeGlobalOnLayoutListener(listener); + } + } + + /** + * @see android.widget.ImageView#setImageAlpha(int) + */ + @SuppressWarnings("deprecation") + public static void setImageAlpha(ImageView iv, int alpha) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { + iv.setImageAlpha(alpha); + } else { + iv.setAlpha(alpha); + } + } + /** * @see android.app.PendingIntent#getCreatorPackage() */ @@ -394,14 +513,11 @@ public static Drawable getDrawable(Resources res, int id) throws NotFoundExcepti } /** - * @see android.content.res.Resources#getDrawableForDensity(int id, int density). + * @see android.view.View#announceForAccessibility(CharSequence text) */ - @SuppressWarnings("deprecation") - public static Drawable getDrawableForDensity(Resources res, int id, int density) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - return res.getDrawableForDensity(id, density, null); - } else { - return res.getDrawableForDensity(id, density); + public static void announceForAccessibility(View view, CharSequence text) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { + view.announceForAccessibility(text); } } } diff --git a/base/android/java/src/org/chromium/base/ApplicationStatus.java b/base/android/java/src/org/chromium/base/ApplicationStatus.java index 8c36b61bd60fe..c7b549d0f3cdc 100644 --- a/base/android/java/src/org/chromium/base/ApplicationStatus.java +++ b/base/android/java/src/org/chromium/base/ApplicationStatus.java @@ -109,11 +109,11 @@ private ApplicationStatus() {} * * @param application The application whose status you wish to monitor. */ - public static void initialize(BaseChromiumApplication application) { - sApplication = application; + public static void initialize(Application app) { + sApplication = app; - application.registerWindowFocusChangedListener( - new BaseChromiumApplication.WindowFocusChangedListener() { + ApplicationStatusManager.registerWindowFocusChangedListener( + new ApplicationStatusManager.WindowFocusChangedListener() { @Override public void onWindowFocusChanged(Activity activity, boolean hasFocus) { if (!hasFocus || activity == sActivity) return; @@ -128,7 +128,7 @@ public void onWindowFocusChanged(Activity activity, boolean hasFocus) { } }); - application.registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() { + sApplication.registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() { @Override public void onActivityCreated(final Activity activity, Bundle savedInstanceState) { onStateChange(activity, ActivityState.CREATED); @@ -193,6 +193,9 @@ private static void onStateChange(Activity activity, int newState) { } ActivityInfo info = sActivityInfo.get(activity); + // Ignore status from none tracked activitys. + if (info == null) return; + info.setStatus(newState); // Notify all state observers that are specifically listening to this activity. @@ -387,6 +390,17 @@ public static void unregisterApplicationStateListener(ApplicationStateListener l sApplicationStateListeners.removeObserver(listener); } + /** + * When ApplicationStatus initialized after application started, the onActivityCreated(), + * onActivityStarted() and onActivityResumed() callbacks will be missed. + * This function will give the chance to simulate these three callbacks. + */ + public static void informActivityStarted(Activity activity) { + onStateChange(activity, ActivityState.CREATED); + onStateChange(activity, ActivityState.STARTED); + onStateChange(activity, ActivityState.RESUMED); + } + /** * Registers the single thread-safe native activity status listener. * This handles the case where the caller is not on the main thread. diff --git a/base/android/java/src/org/chromium/base/ApplicationStatusManager.java b/base/android/java/src/org/chromium/base/ApplicationStatusManager.java new file mode 100644 index 0000000000000..750094a23356b --- /dev/null +++ b/base/android/java/src/org/chromium/base/ApplicationStatusManager.java @@ -0,0 +1,158 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.base; + +import android.app.Activity; +import android.app.Application; +import android.os.Bundle; +import android.view.KeyEvent; +import android.view.Window; + +import java.lang.reflect.InvocationHandler; +import java.lang.reflect.Method; +import java.lang.reflect.Proxy; + +/** + * Basic application functionality that should be shared among all browser applications. + */ +public class ApplicationStatusManager { + /** + * Interface to be implemented by listeners for window focus events. + */ + public interface WindowFocusChangedListener { + /** + * Called when the window focus changes for {@code activity}. + * @param activity The {@link Activity} that has a window focus changed event. + * @param hasFocus Whether or not {@code activity} gained or lost focus. + */ + public void onWindowFocusChanged(Activity activity, boolean hasFocus); + } + + private static ObserverList sWindowFocusListeners = + new ObserverList(); + + /** + * Intercepts calls to an existing Window.Callback. Most invocations are passed on directly + * to the composed Window.Callback but enables intercepting/manipulating others. + * + * This is used to relay window focus changes throughout the app and remedy a bug in the + * appcompat library. + */ + private static class WindowCallbackProxy implements InvocationHandler { + private final Window.Callback mCallback; + private final Activity mActivity; + + public WindowCallbackProxy(Activity activity, Window.Callback callback) { + mCallback = callback; + mActivity = activity; + } + + @Override + public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { + if (method.getName().equals("onWindowFocusChanged") && args.length == 1 + && args[0] instanceof Boolean) { + onWindowFocusChanged((boolean) args[0]); + return null; + } else if (method.getName().equals("dispatchKeyEvent") && args.length == 1 + && args[0] instanceof KeyEvent) { + return dispatchKeyEvent((KeyEvent) args[0]); + } else { + return method.invoke(mCallback, args); + } + } + + public void onWindowFocusChanged(boolean hasFocus) { + mCallback.onWindowFocusChanged(hasFocus); + + for (WindowFocusChangedListener listener : sWindowFocusListeners) { + listener.onWindowFocusChanged(mActivity, hasFocus); + } + } + + public boolean dispatchKeyEvent(KeyEvent event) { + // TODO(aurimas): remove this once AppCompatDelegateImpl no longer steals + // KEYCODE_MENU. (see b/20529185) + if (event.getKeyCode() == KeyEvent.KEYCODE_MENU && mActivity.dispatchKeyEvent(event)) { + return true; + } + return mCallback.dispatchKeyEvent(event); + } + } + + public static void init(Application app) { + ApplicationStatus.initialize(app); + + app.registerActivityLifecycleCallbacks(new Application.ActivityLifecycleCallbacks() { + @Override + public void onActivityCreated(final Activity activity, Bundle savedInstanceState) { + setWindowFocusChangedCallback(activity); + } + + @Override + public void onActivityDestroyed(Activity activity) { + assert Proxy.isProxyClass(activity.getWindow().getCallback().getClass()); + } + + @Override + public void onActivityPaused(Activity activity) { + assert Proxy.isProxyClass(activity.getWindow().getCallback().getClass()); + } + + @Override + public void onActivityResumed(Activity activity) { + assert Proxy.isProxyClass(activity.getWindow().getCallback().getClass()); + } + + @Override + public void onActivitySaveInstanceState(Activity activity, Bundle outState) { + assert Proxy.isProxyClass(activity.getWindow().getCallback().getClass()); + } + + @Override + public void onActivityStarted(Activity activity) { + assert Proxy.isProxyClass(activity.getWindow().getCallback().getClass()); + } + + @Override + public void onActivityStopped(Activity activity) { + assert Proxy.isProxyClass(activity.getWindow().getCallback().getClass()); + } + }); + } + + /** + * Registers a listener to receive window focus updates on activities in this application. + * @param listener Listener to receive window focus events. + */ + public static void registerWindowFocusChangedListener(WindowFocusChangedListener listener) { + sWindowFocusListeners.addObserver(listener); + } + + /** + * Unregisters a listener from receiving window focus updates on activities in this application. + * @param listener Listener that doesn't want to receive window focus events. + */ + public static void unregisterWindowFocusChangedListener(WindowFocusChangedListener listener) { + sWindowFocusListeners.removeObserver(listener); + } + + /** + * When ApplicationStatus initialized after application started, the onActivityCreated(), + * onActivityStarted() and onActivityResumed() callbacks will be missed. + * This function will give the chance to simulate these three callbacks. + */ + public static void informActivityStarted(final Activity activity) { + setWindowFocusChangedCallback(activity); + ApplicationStatus.informActivityStarted(activity); + } + + private static void setWindowFocusChangedCallback(final Activity activity) { + Window.Callback callback = activity.getWindow().getCallback(); + activity.getWindow().setCallback( + (Window.Callback) Proxy.newProxyInstance(Window.Callback.class.getClassLoader(), + new Class[] {Window.Callback.class}, + new WindowCallbackProxy(activity, callback))); + } +} diff --git a/base/android/java/src/org/chromium/base/BaseChromiumApplication.java b/base/android/java/src/org/chromium/base/BaseChromiumApplication.java index c87d02d7d33e8..eac70c6f6538d 100644 --- a/base/android/java/src/org/chromium/base/BaseChromiumApplication.java +++ b/base/android/java/src/org/chromium/base/BaseChromiumApplication.java @@ -4,142 +4,16 @@ package org.chromium.base; -import android.app.Activity; import android.app.Application; import android.content.Context; -import android.os.Bundle; -import android.view.KeyEvent; -import android.view.Window; - -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; /** * Basic application functionality that should be shared among all browser applications. */ public class BaseChromiumApplication extends Application { - /** - * Interface to be implemented by listeners for window focus events. - */ - public interface WindowFocusChangedListener { - /** - * Called when the window focus changes for {@code activity}. - * @param activity The {@link Activity} that has a window focus changed event. - * @param hasFocus Whether or not {@code activity} gained or lost focus. - */ - public void onWindowFocusChanged(Activity activity, boolean hasFocus); - } - - private ObserverList mWindowFocusListeners = - new ObserverList(); - - /** - * Intercepts calls to an existing Window.Callback. Most invocations are passed on directly - * to the composed Window.Callback but enables intercepting/manipulating others. - * - * This is used to relay window focus changes throughout the app and remedy a bug in the - * appcompat library. - */ - private class WindowCallbackProxy implements InvocationHandler { - private final Window.Callback mCallback; - private final Activity mActivity; - - public WindowCallbackProxy(Activity activity, Window.Callback callback) { - mCallback = callback; - mActivity = activity; - } - - @Override - public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { - if (method.getName().equals("onWindowFocusChanged") && args.length == 1 - && args[0] instanceof Boolean) { - onWindowFocusChanged((boolean) args[0]); - return null; - } else if (method.getName().equals("dispatchKeyEvent") && args.length == 1 - && args[0] instanceof KeyEvent) { - return dispatchKeyEvent((KeyEvent) args[0]); - } else { - return method.invoke(mCallback, args); - } - } - - public void onWindowFocusChanged(boolean hasFocus) { - mCallback.onWindowFocusChanged(hasFocus); - - for (WindowFocusChangedListener listener : mWindowFocusListeners) { - listener.onWindowFocusChanged(mActivity, hasFocus); - } - } - - public boolean dispatchKeyEvent(KeyEvent event) { - // TODO(aurimas): remove this once AppCompatDelegateImpl no longer steals - // KEYCODE_MENU. (see b/20529185) - if (event.getKeyCode() == KeyEvent.KEYCODE_MENU && mActivity.dispatchKeyEvent(event)) { - return true; - } - return mCallback.dispatchKeyEvent(event); - } - } - @Override public void onCreate() { super.onCreate(); - ApplicationStatus.initialize(this); - registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() { - @Override - public void onActivityCreated(final Activity activity, Bundle savedInstanceState) { - Window.Callback callback = activity.getWindow().getCallback(); - activity.getWindow().setCallback((Window.Callback) Proxy.newProxyInstance( - Window.Callback.class.getClassLoader(), new Class[] {Window.Callback.class}, - new WindowCallbackProxy(activity, callback))); - } - - @Override - public void onActivityDestroyed(Activity activity) { - assert Proxy.isProxyClass(activity.getWindow().getCallback().getClass()); - } - - @Override - public void onActivityPaused(Activity activity) { - assert Proxy.isProxyClass(activity.getWindow().getCallback().getClass()); - } - - @Override - public void onActivityResumed(Activity activity) { - assert Proxy.isProxyClass(activity.getWindow().getCallback().getClass()); - } - - @Override - public void onActivitySaveInstanceState(Activity activity, Bundle outState) { - assert Proxy.isProxyClass(activity.getWindow().getCallback().getClass()); - } - - @Override - public void onActivityStarted(Activity activity) { - assert Proxy.isProxyClass(activity.getWindow().getCallback().getClass()); - } - - @Override - public void onActivityStopped(Activity activity) { - assert Proxy.isProxyClass(activity.getWindow().getCallback().getClass()); - } - }); - } - - /** - * Registers a listener to receive window focus updates on activities in this application. - * @param listener Listener to receive window focus events. - */ - public void registerWindowFocusChangedListener(WindowFocusChangedListener listener) { - mWindowFocusListeners.addObserver(listener); - } - - /** - * Unregisters a listener from receiving window focus updates on activities in this application. - * @param listener Listener that doesn't want to receive window focus events. - */ - public void unregisterWindowFocusChangedListener(WindowFocusChangedListener listener) { - mWindowFocusListeners.removeObserver(listener); + ApplicationStatusManager.init(this); } /** Initializes the {@link CommandLine}. */ diff --git a/base/android/java/src/org/chromium/base/BuildInfo.java b/base/android/java/src/org/chromium/base/BuildInfo.java index 54f611d5092ea..ce262f41d2ee4 100644 --- a/base/android/java/src/org/chromium/base/BuildInfo.java +++ b/base/android/java/src/org/chromium/base/BuildInfo.java @@ -10,6 +10,7 @@ import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Build; +import android.text.TextUtils; import android.util.Log; /** @@ -122,4 +123,13 @@ public static String getBuildType() { public static int getSdkInt() { return Build.VERSION.SDK_INT; } + + /** + * @return Whether the Android build is M or later. + */ + public static boolean isMncOrLater() { + // TODO(bauerb): Update this once the SDK is updated. + return Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1 + || TextUtils.equals("MNC", Build.VERSION.CODENAME); + } } diff --git a/base/android/java/src/org/chromium/base/ResourceExtractor.java b/base/android/java/src/org/chromium/base/ResourceExtractor.java index d44f2fc7c22bd..d47807ee2c8df 100644 --- a/base/android/java/src/org/chromium/base/ResourceExtractor.java +++ b/base/android/java/src/org/chromium/base/ResourceExtractor.java @@ -25,6 +25,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; +import java.util.Set; import java.util.List; import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; @@ -44,6 +45,7 @@ public class ResourceExtractor { private static final String V8_SNAPSHOT_DATA_FILENAME = "snapshot_blob.bin"; private static String[] sMandatoryPaks = null; + private static ResourceIntercepter sIntercepter = null; // By default, we attempt to extract a pak file for the users // current device locale. Use setExtractImplicitLocale() to @@ -56,6 +58,11 @@ private static boolean isAppDataFile(String file) { || V8_SNAPSHOT_DATA_FILENAME.equals(file); } + public interface ResourceIntercepter { + Set getInterceptableResourceList(); + InputStream interceptLoadingForResource(String resource); + } + private class ExtractTask extends AsyncTask { private static final int BUFFER_SIZE = 16 * 1024; @@ -83,7 +90,8 @@ private void doInBackgroundImpl() { deleteFiles(); } - SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mContext); + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences( + mContext.getApplicationContext()); String currentLocale = LocaleUtils.getDefaultLocale(); String currentLanguage = currentLocale.split("-", 2)[0]; // If everything we need is already there (and the locale hasn't @@ -127,6 +135,18 @@ private void doInBackgroundImpl() { // created above. byte[] buffer = null; String[] files = manager.list(""); + if (sIntercepter != null) { + Set filesIncludingInterceptableFiles = + sIntercepter.getInterceptableResourceList(); + if (filesIncludingInterceptableFiles != null && + !filesIncludingInterceptableFiles.isEmpty()) { + for (String file : files) { + filesIncludingInterceptableFiles.add(file); + } + files = new String[filesIncludingInterceptableFiles.size()]; + filesIncludingInterceptableFiles.toArray(files); + } + } for (String file : files) { if (!paksToInstall.matcher(file).matches()) { continue; @@ -140,7 +160,10 @@ private void doInBackgroundImpl() { OutputStream os = null; beginTraceSection("ExtractResource"); try { - is = manager.open(file); + if (sIntercepter != null) { + is = sIntercepter.interceptLoadingForResource(file); + } + if (is == null) is = manager.open(file); os = new FileOutputStream(output); Log.i(LOGTAG, "Extracting resource " + file); if (buffer == null) { @@ -315,6 +338,19 @@ public static void setMandatoryPaksToExtract(String... mandatoryPaks) { } + /** + * Allow embedders to intercept the resource loading process. Embedders may + * want to load paks from res/raw instead of assets, since assets are not + * supported in Android library project. + * @param intercepter The instance of intercepter which provides the files list + * to intercept and the inputstream for the files it wants to intercept with. + */ + public static void setResourceIntercepter(ResourceIntercepter intercepter) { + assert (sInstance == null || sInstance.mExtractTask == null) + : "Must be called before startExtractingResources is called"; + sIntercepter = intercepter; + } + /** * By default the ResourceExtractor will attempt to extract a pak resource for the users * currently specified locale. This behavior can be changed with this function and is @@ -372,6 +408,10 @@ public void waitForCompletion() { try { mExtractTask.get(); + // ResourceExtractor is not needed any more. + // Release static objects to avoid leak of Context. + sIntercepter = null; + sInstance = null; } catch (CancellationException e) { // Don't leave the files in an inconsistent state. deleteFiles(); diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java index 9dc686572d0bb..f892937ce0a7c 100644 --- a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java +++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java @@ -253,6 +253,9 @@ private void loadAlreadyLocked( apkFilePath = context.getApplicationInfo().sourceDir; if (mProbeMapApkWithExecPermission) { mMapApkWithExecPermission = Linker.checkMapExecSupport(apkFilePath); + } else { + // Assume map executable support on Samsung devices. + mMapApkWithExecPermission = true; } if (!mMapApkWithExecPermission && Linker.isInZipFile()) { Log.w(TAG, "the no map executable support fallback will be used because" diff --git a/base/android/jni_array.cc b/base/android/jni_array.cc index 1bbc66997bdea..a1573543d09fe 100644 --- a/base/android/jni_array.cc +++ b/base/android/jni_array.cc @@ -53,7 +53,7 @@ ScopedJavaLocalRef ToJavaIntArray( ScopedJavaLocalRef ToJavaIntArray( JNIEnv* env, const std::vector& ints) { - return ToJavaIntArray(env, ints.data(), ints.size()); + return ToJavaIntArray(env, ints.begin(), ints.size()); } ScopedJavaLocalRef ToJavaLongArray( @@ -72,7 +72,7 @@ ScopedJavaLocalRef ToJavaLongArray( // Returns a new Java long array converted from the given int64 array. BASE_EXPORT ScopedJavaLocalRef ToJavaLongArray( JNIEnv* env, const std::vector& longs) { - return ToJavaLongArray(env, longs.data(), longs.size()); + return ToJavaLongArray(env, longs.begin(), longs.size()); } ScopedJavaLocalRef ToJavaArrayOfByteArray( diff --git a/base/base.gyp b/base/base.gyp index ff6ce00e24640..b169b6ac0d66b 100644 --- a/base/base.gyp +++ b/base/base.gyp @@ -744,11 +744,6 @@ 'message_loop/message_pump_glib_unittest.cc', ] }], - ['use_ozone == 1', { - 'sources!': [ - 'message_loop/message_pump_glib_unittest.cc', - ] - }], ['OS == "linux"', { 'dependencies': [ 'malloc_wrapper', diff --git a/base/base.gypi b/base/base.gypi index 82d810e36eb5b..29c5d24854ec7 100644 --- a/base/base.gypi +++ b/base/base.gypi @@ -485,6 +485,7 @@ 'process/process_iterator_openbsd.cc', 'process/process_iterator_win.cc', 'process/process_linux.cc', + 'process/process_mac.cc', 'process/process_metrics.cc', 'process/process_metrics.h', 'process/process_metrics_freebsd.cc', @@ -941,11 +942,6 @@ 'strings/string16.cc', ], },], - ['<(use_ozone) == 1', { - 'sources!': [ - 'message_loop/message_pump_glib.cc', - ] - }], ['OS == "linux" and >(nacl_untrusted_build)==0', { 'sources!': [ 'files/file_path_watcher_fsevents.cc', diff --git a/base/base_switches.cc b/base/base_switches.cc index 30765405de180..7f3be7f516c58 100644 --- a/base/base_switches.cc +++ b/base/base_switches.cc @@ -67,6 +67,11 @@ const char kProfilerTiming[] = "profiler-timing"; // chrome://profiler. const char kProfilerTimingDisabledValue[] = "0"; +#if defined(OS_WIN) +// Disables the USB keyboard detection for blocking the OSK on Win8+. +const char kDisableUsbKeyboardDetect[] = "disable-usb-keyboard-detect"; +#endif + #if defined(OS_POSIX) // Used for turning on Breakpad crash reporting in a debug environment where // crash reporting is typically compiled but disabled. diff --git a/base/base_switches.h b/base/base_switches.h index c579f6a240df8..bbd590bad05da 100644 --- a/base/base_switches.h +++ b/base/base_switches.h @@ -27,6 +27,10 @@ extern const char kV[]; extern const char kVModule[]; extern const char kWaitForDebugger[]; +#if defined(OS_WIN) +extern const char kDisableUsbKeyboardDetect[]; +#endif + #if defined(OS_POSIX) extern const char kEnableCrashReporterForTesting[]; #endif diff --git a/base/containers/hash_tables.h b/base/containers/hash_tables.h index 5ce9161917269..d13c46948ed7d 100644 --- a/base/containers/hash_tables.h +++ b/base/containers/hash_tables.h @@ -45,9 +45,15 @@ #undef __DEPRECATED #endif +#if defined(OS_ANDROID) +#include +#include +#define BASE_HASH_IMPL_NAMESPACE std +#else #include #include #define BASE_HASH_IMPL_NAMESPACE __gnu_cxx +#endif #include @@ -78,6 +84,7 @@ struct hash { } }; +#if !defined(OS_ANDROID) // The GNU C++ library provides identity hash functions for many integral types, // but not for |long long|. This hash function will truncate if |size_t| is // narrower than |long long|. This is probably good enough for what we will @@ -95,6 +102,7 @@ DEFINE_TRIVIAL_HASH(long long); DEFINE_TRIVIAL_HASH(unsigned long long); #undef DEFINE_TRIVIAL_HASH +#endif // !defined(OS_ANDROID) // Implement string hash functions so that strings of various flavors can // be used as keys in STL maps and sets. The hash algorithm comes from the diff --git a/base/memory/discardable_shared_memory.cc b/base/memory/discardable_shared_memory.cc index 830d6b9d87fdd..f8248e942cbc6 100644 --- a/base/memory/discardable_shared_memory.cc +++ b/base/memory/discardable_shared_memory.cc @@ -157,6 +157,14 @@ bool DiscardableSharedMemory::Map(size_t size) { return true; } +bool DiscardableSharedMemory::Unmap() { + if (!shared_memory_.Unmap()) + return false; + + mapped_size_ = 0; + return true; +} + DiscardableSharedMemory::LockResult DiscardableSharedMemory::Lock( size_t offset, size_t length) { DCHECK_EQ(AlignToPageSize(offset), offset); @@ -212,10 +220,11 @@ DiscardableSharedMemory::LockResult DiscardableSharedMemory::Lock( #if defined(OS_ANDROID) SharedMemoryHandle handle = shared_memory_.handle(); - DCHECK(SharedMemory::IsHandleValid(handle)); - if (ashmem_pin_region( - handle.fd, AlignToPageSize(sizeof(SharedState)) + offset, length)) { - return PURGED; + if (SharedMemory::IsHandleValid(handle)) { + if (ashmem_pin_region( + handle.fd, AlignToPageSize(sizeof(SharedState)) + offset, length)) { + return PURGED; + } } #endif @@ -237,10 +246,11 @@ void DiscardableSharedMemory::Unlock(size_t offset, size_t length) { #if defined(OS_ANDROID) SharedMemoryHandle handle = shared_memory_.handle(); - DCHECK(SharedMemory::IsHandleValid(handle)); - if (ashmem_unpin_region( - handle.fd, AlignToPageSize(sizeof(SharedState)) + offset, length)) { - DPLOG(ERROR) << "ashmem_unpin_region() failed"; + if (SharedMemory::IsHandleValid(handle)) { + if (ashmem_unpin_region( + handle.fd, AlignToPageSize(sizeof(SharedState)) + offset, length)) { + DPLOG(ERROR) << "ashmem_unpin_region() failed"; + } } #endif @@ -336,9 +346,7 @@ bool DiscardableSharedMemory::IsMemoryResident() const { } void DiscardableSharedMemory::Close() { - shared_memory_.Unmap(); shared_memory_.Close(); - mapped_size_ = 0; } #if defined(DISCARDABLE_SHARED_MEMORY_SHRINKING) diff --git a/base/memory/discardable_shared_memory.h b/base/memory/discardable_shared_memory.h index 892d556471ed8..74bbe8e95f427 100644 --- a/base/memory/discardable_shared_memory.h +++ b/base/memory/discardable_shared_memory.h @@ -48,6 +48,11 @@ class BASE_EXPORT DiscardableSharedMemory { // Returns true on success, false otherwise. bool Map(size_t size); + // Unmaps the discardable shared memory from the caller's address space. + // Returns true if successful; returns false on error or if the memory is + // not mapped. + bool Unmap(); + // The actual size of the mapped memory (may be larger than requested). size_t mapped_size() const { return mapped_size_; } diff --git a/base/memory/discardable_shared_memory_unittest.cc b/base/memory/discardable_shared_memory_unittest.cc index ae7235d108cd6..91b0b68523aed 100644 --- a/base/memory/discardable_shared_memory_unittest.cc +++ b/base/memory/discardable_shared_memory_unittest.cc @@ -306,11 +306,34 @@ TEST(DiscardableSharedMemoryTest, MappedSize) { EXPECT_LE(kDataSize, memory.mapped_size()); - // Mapped size should be 0 after memory segment has been closed. - memory.Close(); + // Mapped size should be 0 after memory segment has been unmapped. + rv = memory.Unmap(); + EXPECT_TRUE(rv); EXPECT_EQ(0u, memory.mapped_size()); } +TEST(DiscardableSharedMemoryTest, Close) { + const uint32 kDataSize = 1024; + + TestDiscardableSharedMemory memory; + bool rv = memory.CreateAndMap(kDataSize); + ASSERT_TRUE(rv); + + // Mapped size should be unchanged after memory segment has been closed. + memory.Close(); + EXPECT_LE(kDataSize, memory.mapped_size()); + + // Memory is initially locked. Unlock it. + memory.SetNow(Time::FromDoubleT(1)); + memory.Unlock(0, 0); + + // Lock and unlock memory. + auto lock_rv = memory.Lock(0, 0); + EXPECT_EQ(DiscardableSharedMemory::SUCCESS, lock_rv); + memory.SetNow(Time::FromDoubleT(2)); + memory.Unlock(0, 0); +} + #if defined(DISCARDABLE_SHARED_MEMORY_SHRINKING) TEST(DiscardableSharedMemoryTest, Shrink) { const uint32 kDataSize = 1024; diff --git a/base/numerics/safe_math_impl.h b/base/numerics/safe_math_impl.h index c8451898bb522..08f2e88345f34 100644 --- a/base/numerics/safe_math_impl.h +++ b/base/numerics/safe_math_impl.h @@ -176,8 +176,8 @@ typename enable_if::is_integer&& std::numeric_limits< T>::is_signed&&(sizeof(T) * 2 > sizeof(uintmax_t)), T>::type CheckedMul(T x, T y, RangeConstraint* validity) { - // if either side is zero then the result will be zero. - if (!(x || y)) { + // If either side is zero then the result will be zero. + if (!x || !y) { return RANGE_VALID; } else if (x > 0) { diff --git a/base/numerics/safe_numerics_unittest.cc b/base/numerics/safe_numerics_unittest.cc index bdececb19364c..3185b06faf087 100644 --- a/base/numerics/safe_numerics_unittest.cc +++ b/base/numerics/safe_numerics_unittest.cc @@ -239,6 +239,9 @@ static void TestArithmetic(const char* dst, int line) { TEST_EXPECTED_VALUE(0, (CheckedNumeric() * 1)); TEST_EXPECTED_VALUE(1, (CheckedNumeric(1) * 1)); TEST_EXPECTED_VALUE(-2, (CheckedNumeric(-1) * 2)); + TEST_EXPECTED_VALUE(0, (CheckedNumeric(0) * 0)); + TEST_EXPECTED_VALUE(0, (CheckedNumeric(-1) * 0)); + TEST_EXPECTED_VALUE(0, (CheckedNumeric(0) * -1)); TEST_EXPECTED_VALIDITY( RANGE_OVERFLOW, CheckedNumeric(DstLimits::max()) * DstLimits::max()); diff --git a/base/process/BUILD.gn b/base/process/BUILD.gn index e570647ebfd60..814459b13e038 100644 --- a/base/process/BUILD.gn +++ b/base/process/BUILD.gn @@ -41,6 +41,7 @@ source_set("process") { "process_iterator_openbsd.cc", "process_iterator_win.cc", "process_linux.cc", + "process_mac.cc", "process_metrics.cc", "process_metrics.h", "process_metrics_freebsd.cc", diff --git a/base/process/process.h b/base/process/process.h index 808baeb1fc6eb..7fb1b69954cbe 100644 --- a/base/process/process.h +++ b/base/process/process.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -107,6 +107,24 @@ class BASE_EXPORT Process { // Same as WaitForExit() but only waits for up to |timeout|. bool WaitForExitWithTimeout(TimeDelta timeout, int* exit_code); +#if defined(OS_MACOSX) + // The Mac needs a Mach port in order to manipulate a process's priority, + // and there's no good way to get that from base given the pid. These Mac + // variants of the IsProcessBackgrounded and SetProcessBackgrounded API take + // the Mach port for this reason. See crbug.com/460102 + // + // A process is backgrounded when its priority is lower than normal. + // Return true if the process with mach port |task_port| is backgrounded, + // false otherwise. + bool IsProcessBackgrounded(mach_port_t task_port) const; + + // Set the process with the specified mach port as backgrounded. If value is + // true, the priority of the process will be lowered. If value is false, the + // priority of the process will be made "normal" - equivalent to default + // process priority. Returns true if the priority was changed, false + // otherwise. + bool SetProcessBackgrounded(mach_port_t task_port, bool value); +#else // A process is backgrounded when it's priority is lower than normal. // Return true if this process is backgrounded, false otherwise. bool IsProcessBackgrounded() const; @@ -116,7 +134,7 @@ class BASE_EXPORT Process { // will be made "normal" - equivalent to default process priority. // Returns true if the priority was changed, false otherwise. bool SetProcessBackgrounded(bool value); - +#endif // defined(OS_MACOSX) // Returns an integer representing the priority of a process. The meaning // of this value is OS dependent. int GetPriority() const; diff --git a/base/process/process_mac.cc b/base/process/process_mac.cc new file mode 100644 index 0000000000000..1913cc378e837 --- /dev/null +++ b/base/process/process_mac.cc @@ -0,0 +1,128 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/process/process.h" + +#include "base/mac/mac_util.h" +#include "base/mac/mach_logging.h" + +#include + +// The following was added to after 10.8. +// TODO(shrike): Remove the TASK_OVERRIDE_QOS_POLICY ifndef once builders +// reach 10.9 or higher. +#ifndef TASK_OVERRIDE_QOS_POLICY + +#define TASK_OVERRIDE_QOS_POLICY 9 + +typedef struct task_category_policy task_category_policy_data_t; +typedef struct task_category_policy* task_category_policy_t; + +enum task_latency_qos { + LATENCY_QOS_TIER_UNSPECIFIED = 0x0, + LATENCY_QOS_TIER_0 = ((0xFF << 16) | 1), + LATENCY_QOS_TIER_1 = ((0xFF << 16) | 2), + LATENCY_QOS_TIER_2 = ((0xFF << 16) | 3), + LATENCY_QOS_TIER_3 = ((0xFF << 16) | 4), + LATENCY_QOS_TIER_4 = ((0xFF << 16) | 5), + LATENCY_QOS_TIER_5 = ((0xFF << 16) | 6) +}; +typedef integer_t task_latency_qos_t; +enum task_throughput_qos { + THROUGHPUT_QOS_TIER_UNSPECIFIED = 0x0, + THROUGHPUT_QOS_TIER_0 = ((0xFE << 16) | 1), + THROUGHPUT_QOS_TIER_1 = ((0xFE << 16) | 2), + THROUGHPUT_QOS_TIER_2 = ((0xFE << 16) | 3), + THROUGHPUT_QOS_TIER_3 = ((0xFE << 16) | 4), + THROUGHPUT_QOS_TIER_4 = ((0xFE << 16) | 5), + THROUGHPUT_QOS_TIER_5 = ((0xFE << 16) | 6), +}; + +#define LATENCY_QOS_LAUNCH_DEFAULT_TIER LATENCY_QOS_TIER_3 +#define THROUGHPUT_QOS_LAUNCH_DEFAULT_TIER THROUGHPUT_QOS_TIER_3 + +typedef integer_t task_throughput_qos_t; + +struct task_qos_policy { + task_latency_qos_t task_latency_qos_tier; + task_throughput_qos_t task_throughput_qos_tier; +}; + +typedef struct task_qos_policy* task_qos_policy_t; +#define TASK_QOS_POLICY_COUNT \ + ((mach_msg_type_number_t)(sizeof(struct task_qos_policy) / sizeof(integer_t))) + +#endif // TASK_OVERRIDE_QOS_POLICY + +namespace base { + +bool Process::CanBackgroundProcesses() { + return true; +} + +bool Process::IsProcessBackgrounded(mach_port_t task_port) const { + // See SetProcessBackgrounded(). + DCHECK(IsValid()); + DCHECK_NE(task_port, TASK_NULL); + + task_category_policy_data_t category_policy; + mach_msg_type_number_t task_info_count = TASK_CATEGORY_POLICY_COUNT; + boolean_t get_default = FALSE; + + kern_return_t result = + task_policy_get(task_port, TASK_CATEGORY_POLICY, + reinterpret_cast(&category_policy), + &task_info_count, &get_default); + MACH_LOG_IF(ERROR, result != KERN_SUCCESS, result) << + "task_policy_get TASK_CATEGORY_POLICY"; + + if (result == KERN_SUCCESS && get_default == FALSE) { + return category_policy.role == TASK_BACKGROUND_APPLICATION; + } + return false; +} + +bool Process::SetProcessBackgrounded(mach_port_t task_port, bool background) { + DCHECK(IsValid()); + DCHECK_NE(task_port, TASK_NULL); + + if (!CanBackgroundProcesses()) { + return false; + } else if (IsProcessBackgrounded(task_port) == background) { + return true; + } + + task_category_policy category_policy; + category_policy.role = + background ? TASK_BACKGROUND_APPLICATION : TASK_FOREGROUND_APPLICATION; + kern_return_t result = + task_policy_set(task_port, TASK_CATEGORY_POLICY, + reinterpret_cast(&category_policy), + TASK_CATEGORY_POLICY_COUNT); + + if (result != KERN_SUCCESS) { + MACH_LOG(ERROR, result) << "task_policy_set TASK_CATEGORY_POLICY"; + return false; + } else if (!mac::IsOSMavericksOrLater()) { + return true; + } + + // Latency QoS regulates timer throttling/accuracy. Select default tier + // on foreground because precise timer firing isn't needed. + struct task_qos_policy qos_policy = { + background ? LATENCY_QOS_TIER_5 : LATENCY_QOS_TIER_UNSPECIFIED, + background ? THROUGHPUT_QOS_TIER_5 : THROUGHPUT_QOS_TIER_UNSPECIFIED + }; + result = task_policy_set(task_port, TASK_OVERRIDE_QOS_POLICY, + reinterpret_cast(&qos_policy), + TASK_QOS_POLICY_COUNT); + if (result != KERN_SUCCESS) { + MACH_LOG(ERROR, result) << "task_policy_set TASK_OVERRIDE_QOS_POLICY"; + return false; + } + + return true; +} + +} // namespace base diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc index a7d16f87304f2..8037da3ac6e1e 100644 --- a/base/process/process_posix.cc +++ b/base/process/process_posix.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -253,12 +253,12 @@ Process Process::DeprecatedGetProcessFromHandle(ProcessHandle handle) { return Process(handle); } -#if !defined(OS_LINUX) +#if !defined(OS_LINUX) && !defined(OS_MACOSX) // static bool Process::CanBackgroundProcesses() { return false; } -#endif // !defined(OS_LINUX) +#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) bool Process::IsValid() const { return process_ != kNullProcessHandle; @@ -353,7 +353,7 @@ bool Process::WaitForExitWithTimeout(TimeDelta timeout, int* exit_code) { return WaitForExitWithTimeoutImpl(Handle(), exit_code, timeout); } -#if !defined(OS_LINUX) +#if !defined(OS_LINUX) && !defined(OS_MACOSX) bool Process::IsProcessBackgrounded() const { // See SetProcessBackgrounded(). DCHECK(IsValid()); @@ -361,13 +361,13 @@ bool Process::IsProcessBackgrounded() const { } bool Process::SetProcessBackgrounded(bool value) { - // POSIX only allows lowering the priority of a process, so if we - // were to lower it we wouldn't be able to raise it back to its initial - // priority. - DCHECK(IsValid()); + // Not implemented for POSIX systems other than Mac and Linux. With POSIX, if + // we were to lower the process priority we wouldn't be able to raise it back + // to its initial priority. + NOTIMPLEMENTED(); return false; } -#endif // !defined(OS_LINUX) +#endif // !defined(OS_LINUX) && !defined(OS_MACOSX) int Process::GetPriority() const { DCHECK(IsValid()); diff --git a/base/process/process_unittest.cc b/base/process/process_unittest.cc index ba8e4e6f68820..e094c032f3bb0 100644 --- a/base/process/process_unittest.cc +++ b/base/process/process_unittest.cc @@ -11,6 +11,10 @@ #include "testing/gtest/include/gtest/gtest.h" #include "testing/multiprocess_func_list.h" +#if defined(OS_MACOSX) +#include +#endif // OS_MACOSX + namespace { #if defined(OS_WIN) @@ -170,7 +174,19 @@ TEST_F(ProcessTest, WaitForExitWithTimeout) { TEST_F(ProcessTest, SetProcessBackgrounded) { Process process(SpawnChild("SimpleChildProcess")); int old_priority = process.GetPriority(); -#if defined(OS_WIN) +#if defined(OS_MACOSX) + // On the Mac, backgrounding a process requires a port to that process. + // In the browser it's available through the MachBroker class, which is not + // part of base. Additionally, there is an indefinite amount of time between + // spawning a process and receiving its port. Because this test just checks + // the ability to background/foreground a process, we can use the current + // process's port instead. + mach_port_t process_port = mach_task_self(); + EXPECT_TRUE(process.SetProcessBackgrounded(process_port, true)); + EXPECT_TRUE(process.IsProcessBackgrounded(process_port)); + EXPECT_TRUE(process.SetProcessBackgrounded(process_port, false)); + EXPECT_FALSE(process.IsProcessBackgrounded(process_port)); +#elif defined(OS_WIN) EXPECT_TRUE(process.SetProcessBackgrounded(true)); EXPECT_TRUE(process.IsProcessBackgrounded()); EXPECT_TRUE(process.SetProcessBackgrounded(false)); @@ -188,7 +204,13 @@ TEST_F(ProcessTest, SetProcessBackgrounded) { TEST_F(ProcessTest, SetProcessBackgroundedSelf) { Process process = Process::Current(); int old_priority = process.GetPriority(); -#if defined(OS_WIN) +#if defined(OS_MACOSX) + mach_port_t process_port = mach_task_self(); + EXPECT_TRUE(process.SetProcessBackgrounded(process_port, true)); + EXPECT_TRUE(process.IsProcessBackgrounded(process_port)); + EXPECT_TRUE(process.SetProcessBackgrounded(process_port, false)); + EXPECT_FALSE(process.IsProcessBackgrounded(process_port)); +#elif defined(OS_WIN) EXPECT_TRUE(process.SetProcessBackgrounded(true)); EXPECT_TRUE(process.IsProcessBackgrounded()); EXPECT_TRUE(process.SetProcessBackgrounded(false)); diff --git a/base/process/process_win.cc b/base/process/process_win.cc index 0d312a3599088..8e7b82c335014 100644 --- a/base/process/process_win.cc +++ b/base/process/process_win.cc @@ -9,6 +9,7 @@ #include "base/metrics/field_trial.h" #include "base/numerics/safe_conversions.h" #include "base/process/kill.h" +#include "base/strings/string_util.h" #include "base/win/windows_version.h" namespace { @@ -188,8 +189,10 @@ bool Process::SetProcessBackgrounded(bool value) { DWORD background_priority = IDLE_PRIORITY_CLASS; base::FieldTrial* trial = base::FieldTrialList::Find("BackgroundRendererProcesses"); - if (trial && trial->group_name() == "AllowBelowNormalFromBrowser") + if (trial && StartsWithASCII(trial->group_name(), + "AllowBelowNormalFromBrowser", true)) { background_priority = BELOW_NORMAL_PRIORITY_CLASS; + } priority = value ? background_priority : NORMAL_PRIORITY_CLASS; } diff --git a/base/strings/string_util.cc b/base/strings/string_util.cc index 6f6d6e2b6bd24..e084cb5597da6 100644 --- a/base/strings/string_util.cc +++ b/base/strings/string_util.cc @@ -454,6 +454,8 @@ bool LowerCaseEqualsASCII(string16::const_iterator a_begin, return DoLowerCaseEqualsASCII(a_begin, a_end, b); } +// TODO(port): Resolve wchar_t/iterator issues that require OS_ANDROID here. +#if !defined(OS_ANDROID) bool LowerCaseEqualsASCII(const char* a_begin, const char* a_end, const char* b) { @@ -466,6 +468,8 @@ bool LowerCaseEqualsASCII(const char16* a_begin, return DoLowerCaseEqualsASCII(a_begin, a_end, b); } +#endif // !defined(OS_ANDROID) + bool EqualsASCII(const string16& a, const base::StringPiece& b) { if (a.length() != b.length()) return false; diff --git a/base/threading/platform_thread_android.cc b/base/threading/platform_thread_android.cc index 11e5e2e3c870d..e661af5eab0c9 100644 --- a/base/threading/platform_thread_android.cc +++ b/base/threading/platform_thread_android.cc @@ -23,22 +23,15 @@ namespace base { namespace internal { -// These nice values are taken from Android, which uses nice values like linux, -// but defines some preset nice values. -// Process.THREAD_PRIORITY_AUDIO = -16 -// Process.THREAD_PRIORITY_BACKGROUND = 10 -// Process.THREAD_PRIORITY_DEFAULT = 0; -// Process.THREAD_PRIORITY_DISPLAY = -4; -// Process.THREAD_PRIORITY_FOREGROUND = -2; -// Process.THREAD_PRIORITY_LESS_FAVORABLE = 1; -// Process.THREAD_PRIORITY_LOWEST = 19; -// Process.THREAD_PRIORITY_MORE_FAVORABLE = -1; -// Process.THREAD_PRIORITY_URGENT_AUDIO = -19; -// Process.THREAD_PRIORITY_URGENT_DISPLAY = -8; -// We use -6 for display, but we may want to split this into urgent (-8) and -// non-urgent (-4). +// - BACKGROUND is 9 due to it being the nicest value we can use that's still +// above an Android system threshold that enables heavy throttling starting at +// 10; we want to be lower-priority than Chrome's other threads without +// incurring this behavior. +// - DISPLAY is -6 due to being midway between Android's DISPLAY (-4) and +// URGENT_DISPLAY (-8). +// - REALTIME_AUDIO corresponds to Android's THREAD_PRIORITY_AUDIO = -16 value. const ThreadPriorityToNiceValuePair kThreadPriorityToNiceValueMap[4] = { - {ThreadPriority::BACKGROUND, 10}, + {ThreadPriority::BACKGROUND, 9}, {ThreadPriority::NORMAL, 0}, {ThreadPriority::DISPLAY, -6}, {ThreadPriority::REALTIME_AUDIO, -16}, diff --git a/base/threading/thread_local.h b/base/threading/thread_local.h index df9c4b72573be..b6bfb8a2dd9d5 100644 --- a/base/threading/thread_local.h +++ b/base/threading/thread_local.h @@ -80,6 +80,7 @@ struct BASE_EXPORT ThreadLocalPlatform { } // namespace internal +#if !defined(OS_ANDROID) template class ThreadLocalPointer { public: @@ -108,6 +109,28 @@ class ThreadLocalPointer { DISALLOW_COPY_AND_ASSIGN(ThreadLocalPointer); }; +#else +template + class ThreadLocalPointer { + public: + ThreadLocalPointer() {} + + ~ThreadLocalPointer() { slot_.Free(); } + + Type* Get() { + return static_cast(slot_.Get()); + } + + void Set(Type* ptr) { + slot_.Set(const_cast(static_cast(ptr))); + } + + private: + ThreadLocalStorage::Slot slot_; + + DISALLOW_COPY_AND_ASSIGN(ThreadLocalPointer); +}; +#endif // !OS_ANDROID class ThreadLocalBoolean { public: diff --git a/base/win/shortcut.cc b/base/win/shortcut.cc index f8b2182b28664..57f8e615d1dc5 100644 --- a/base/win/shortcut.cc +++ b/base/win/shortcut.cc @@ -5,13 +5,18 @@ #include "base/win/shortcut.h" #include +#include #include #include #include "base/files/file_util.h" +#include "base/strings/string_util.h" #include "base/threading/thread_restrictions.h" +#include "base/win/scoped_bstr.h" #include "base/win/scoped_comptr.h" +#include "base/win/scoped_handle.h" #include "base/win/scoped_propvariant.h" +#include "base/win/scoped_variant.h" #include "base/win/win_util.h" #include "base/win/windows_version.h" @@ -20,6 +25,90 @@ namespace win { namespace { +// String resource IDs in shell32.dll. +const uint32_t kPinToTaskbarID = 5386; +const uint32_t kUnpinFromTaskbarID = 5387; + +// Traits for a GenericScopedHandle that will free a module on closure. +struct ModuleTraits { + typedef HMODULE Handle; + static Handle NullHandle() { return nullptr; } + static bool IsHandleValid(Handle module) { return !!module; } + static bool CloseHandle(Handle module) { return !!::FreeLibrary(module); } + + private: + DISALLOW_IMPLICIT_CONSTRUCTORS(ModuleTraits); +}; + +// An object that will free a module when it goes out of scope. +using ScopedLibrary = GenericScopedHandle; + +// Returns the shell resource string identified by |resource_id|, or an empty +// string on error. +string16 LoadShellResourceString(uint32_t resource_id) { + ScopedLibrary shell32(::LoadLibrary(L"shell32.dll")); + if (!shell32.IsValid()) + return string16(); + + const wchar_t* resource_ptr = nullptr; + int length = ::LoadStringW(shell32.Get(), resource_id, + reinterpret_cast(&resource_ptr), 0); + if (!length || !resource_ptr) + return string16(); + return string16(resource_ptr, length); +} + +// Uses the shell to perform the verb identified by |resource_id| on |path|. +bool DoVerbOnFile(uint32_t resource_id, const FilePath& path) { + string16 verb_name(LoadShellResourceString(resource_id)); + if (verb_name.empty()) + return false; + + ScopedComPtr shell_dispatch; + HRESULT hresult = + shell_dispatch.CreateInstance(CLSID_Shell, nullptr, CLSCTX_INPROC_SERVER); + if (FAILED(hresult) || !shell_dispatch.get()) + return false; + + ScopedComPtr folder; + hresult = shell_dispatch->NameSpace( + ScopedVariant(path.DirName().value().c_str()), folder.Receive()); + if (FAILED(hresult) || !folder.get()) + return false; + + ScopedComPtr item; + hresult = folder->ParseName(ScopedBstr(path.BaseName().value().c_str()), + item.Receive()); + if (FAILED(hresult) || !item.get()) + return false; + + ScopedComPtr verbs; + hresult = item->Verbs(verbs.Receive()); + if (FAILED(hresult) || !verbs.get()) + return false; + + long verb_count = 0; + hresult = verbs->get_Count(&verb_count); + if (FAILED(hresult)) + return false; + + for (long i = 0; i < verb_count; ++i) { + ScopedComPtr verb; + hresult = verbs->Item(ScopedVariant(i, VT_I4), verb.Receive()); + if (FAILED(hresult) || !verb.get()) + continue; + ScopedBstr name; + hresult = verb->get_Name(name.Receive()); + if (FAILED(hresult)) + continue; + if (StringPiece16(name, name.Length()) == verb_name) { + hresult = verb->DoIt(); + return SUCCEEDED(hresult); + } + } + return false; +} + // Initializes |i_shell_link| and |i_persist_file| (releasing them first if they // are already initialized). // If |shortcut| is not NULL, loads |shortcut| into |i_persist_file|. @@ -314,28 +403,24 @@ bool ResolveShortcut(const FilePath& shortcut_path, return true; } -bool TaskbarPinShortcutLink(const wchar_t* shortcut) { +bool TaskbarPinShortcutLink(const FilePath& shortcut) { base::ThreadRestrictions::AssertIOAllowed(); // "Pin to taskbar" is only supported after Win7. if (GetVersion() < VERSION_WIN7) return false; - intptr_t result = reinterpret_cast( - ShellExecute(NULL, L"taskbarpin", shortcut, NULL, NULL, 0)); - return result > 32; + return DoVerbOnFile(kPinToTaskbarID, shortcut); } -bool TaskbarUnpinShortcutLink(const wchar_t* shortcut) { +bool TaskbarUnpinShortcutLink(const FilePath& shortcut) { base::ThreadRestrictions::AssertIOAllowed(); // "Unpin from taskbar" is only supported after Win7. if (GetVersion() < VERSION_WIN7) return false; - intptr_t result = reinterpret_cast( - ShellExecute(NULL, L"taskbarunpin", shortcut, NULL, NULL, 0)); - return result > 32; + return DoVerbOnFile(kUnpinFromTaskbarID, shortcut); } } // namespace win diff --git a/base/win/shortcut.h b/base/win/shortcut.h index 6f7d10c8ee715..6c85f0151d8fa 100644 --- a/base/win/shortcut.h +++ b/base/win/shortcut.h @@ -155,12 +155,12 @@ BASE_EXPORT bool ResolveShortcut(const FilePath& shortcut_path, // Pins a shortcut to the Windows 7 taskbar. The shortcut file must already // exist and be a shortcut that points to an executable. The app id of the // shortcut is used to group windows and must be set correctly. -BASE_EXPORT bool TaskbarPinShortcutLink(const wchar_t* shortcut); +BASE_EXPORT bool TaskbarPinShortcutLink(const FilePath& shortcut); // Unpins a shortcut from the Windows 7 taskbar. The shortcut must exist and // already be pinned to the taskbar. The app id of the shortcut is used as the // identifier for the taskbar item to remove and must be set correctly. -BASE_EXPORT bool TaskbarUnpinShortcutLink(const wchar_t* shortcut); +BASE_EXPORT bool TaskbarUnpinShortcutLink(const FilePath& shortcut); } // namespace win } // namespace base diff --git a/base/win/win_util.cc b/base/win/win_util.cc index c5b06c48f8a10..6f8cdaf5fdaf0 100644 --- a/base/win/win_util.cc +++ b/base/win/win_util.cc @@ -19,11 +19,14 @@ #include #include +#include "base/base_switches.h" +#include "base/command_line.h" #include "base/lazy_instance.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" +#include "base/strings/utf_string_conversions.h" #include "base/threading/thread_restrictions.h" #include "base/win/metro.h" #include "base/win/registry.h" @@ -32,6 +35,9 @@ #include "base/win/scoped_propvariant.h" #include "base/win/windows_version.h" +namespace base { +namespace win { + namespace { // Sets the value of |property_key| to |property_value| in |property_store|. @@ -55,24 +61,50 @@ const wchar_t kWindows8OSKRegPath[] = L"Software\\Classes\\CLSID\\{054AAE20-4BEA-4347-8A35-64A533254A9D}" L"\\LocalServer32"; +} // namespace + // Returns true if a physical keyboard is detected on Windows 8 and up. // Uses the Setup APIs to enumerate the attached keyboards and returns true // if the keyboard count is 1 or more.. While this will work in most cases // it won't work if there are devices which expose keyboard interfaces which // are attached to the machine. -bool IsKeyboardPresentOnSlate() { +bool IsKeyboardPresentOnSlate(std::string* reason) { + bool result = false; + + if (GetVersion() < VERSION_WIN7) { + if (reason) + *reason = "Detection not supported"; + return false; + } + // This function is only supported for Windows 8 and up. - DCHECK(base::win::GetVersion() >= base::win::VERSION_WIN8); + if (CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableUsbKeyboardDetect)) { + if (reason) + *reason = "Detection disabled"; + return false; + } // This function should be only invoked for machines with touch screens. if ((GetSystemMetrics(SM_DIGITIZER) & NID_INTEGRATED_TOUCH) != NID_INTEGRATED_TOUCH) { - return true; + if (reason) { + *reason += "NID_INTEGRATED_TOUCH\n"; + result = true; + } else { + return true; + } } // If the device is docked, the user is treating the device as a PC. - if (GetSystemMetrics(SM_SYSTEMDOCKED) != 0) - return true; + if (GetSystemMetrics(SM_SYSTEMDOCKED) != 0) { + if (reason) { + *reason += "SM_SYSTEMDOCKED\n"; + result = true; + } else { + return true; + } + } // To determine whether a keyboard is present on the device, we do the // following:- @@ -103,7 +135,13 @@ bool IsKeyboardPresentOnSlate() { // If there is no auto rotation sensor or rotation is not supported in // the current configuration, then we can assume that this is a desktop // or a traditional laptop. - return true; + if (reason) { + *reason += (auto_rotation_state & AR_NOSENSOR) ? "AR_NOSENSOR\n" : + "AR_NOT_SUPPORTED\n"; + result = true; + } else { + return true; + } } } @@ -114,8 +152,15 @@ bool IsKeyboardPresentOnSlate() { POWER_PLATFORM_ROLE role = PowerDeterminePlatformRole(); if (((role == PlatformRoleMobile) || (role == PlatformRoleSlate)) && - (GetSystemMetrics(SM_CONVERTIBLESLATEMODE) == 0)) - return false; + (GetSystemMetrics(SM_CONVERTIBLESLATEMODE) == 0)) { + if (reason) { + *reason += (role == PlatformRoleMobile) ? "PlatformRoleMobile\n" : + "PlatformRoleSlate\n"; + // Don't change result here if it's already true. + } else { + return false; + } + } const GUID KEYBOARD_CLASS_GUID = { 0x4D36E96B, 0xE325, 0x11CE, @@ -124,13 +169,15 @@ bool IsKeyboardPresentOnSlate() { // Query for all the keyboard devices. HDEVINFO device_info = SetupDiGetClassDevs(&KEYBOARD_CLASS_GUID, NULL, NULL, DIGCF_PRESENT); - if (device_info == INVALID_HANDLE_VALUE) - return false; + if (device_info == INVALID_HANDLE_VALUE) { + if (reason) + *reason += "No keyboard info\n"; + return result; + } // Enumerate all keyboards and look for ACPI\PNP and HID\VID devices. If // the count is more than 1 we assume that a keyboard is present. This is // under the assumption that there will always be one keyboard device. - int keyboard_count = 0; for (DWORD i = 0;; ++i) { SP_DEVINFO_DATA device_info_data = { 0 }; device_info_data.cbSize = sizeof(device_info_data); @@ -148,21 +195,22 @@ bool IsKeyboardPresentOnSlate() { // prefixes in the keyboard device ids. if (StartsWith(device_id, L"ACPI", false) || StartsWith(device_id, L"HID\\VID", false)) { - keyboard_count++; + if (reason) { + *reason += "device: "; + *reason += WideToUTF8(device_id); + *reason += '\n'; + } + // The heuristic we are using is to check the count of keyboards and + // return true if the API's report one or more keyboards. Please note + // that this will break for non keyboard devices which expose a + // keyboard PDO. + result = true; } } } - // The heuristic we are using is to check the count of keyboards and return - // true if the API's report one or more keyboards. Please note that this - // will break for non keyboard devices which expose a keyboard PDO. - return keyboard_count >= 1; + return result; } -} // namespace - -namespace base { -namespace win { - static bool g_crash_on_process_detach = false; void GetNonClientMetrics(NONCLIENTMETRICS_XP* metrics) { @@ -352,7 +400,7 @@ bool DisplayVirtualKeyboard() { if (base::win::GetVersion() < base::win::VERSION_WIN8) return false; - if (IsKeyboardPresentOnSlate()) + if (IsKeyboardPresentOnSlate(nullptr)) return false; static base::LazyInstance::Leaky osk_path = diff --git a/base/win/win_util.h b/base/win/win_util.h index 8513f62bf1915..9f42e445748f3 100644 --- a/base/win/win_util.h +++ b/base/win/win_util.h @@ -132,6 +132,11 @@ BASE_EXPORT void SetAbortBehaviorForCrashReporting(); // insight into how users use Chrome. BASE_EXPORT bool IsTabletDevice(); +// A slate is a touch device that may have a keyboard attached. This function +// returns true if a keyboard is attached and optionally will set the reason +// parameter to the detection method that was used to detect the keyboard. +BASE_EXPORT bool IsKeyboardPresentOnSlate(std::string* reason); + // Get the size of a struct up to and including the specified member. // This is necessary to set compatible struct sizes for different versions // of certain Windows APIs (e.g. SystemParametersInfo). diff --git a/build/all.gyp b/build/all.gyp index 04ba3f889c9e2..b3917b4b60757 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -1245,7 +1245,7 @@ 'target_name': 'chrome_official_builder', 'type': 'none', 'dependencies': [ - 'chrome_official_builder_no_unittests', + 'chrome_official_builder_no_unittests', '../base/base.gyp:base_unittests', '../chrome/chrome.gyp:app_installer_unittests', '../chrome/chrome.gyp:browser_tests', @@ -1253,7 +1253,7 @@ '../ipc/ipc.gyp:ipc_tests', '../media/media.gyp:media_unittests', '../media/midi/midi.gyp:midi_unittests', - '../net/net.gyp:net_unittests_run', + '../net/net.gyp:net_unittests', '../printing/printing.gyp:printing_unittests', '../sql/sql.gyp:sql_unittests', '../sync/sync.gyp:sync_unit_tests', diff --git a/build/android/AndroidManifest.xml b/build/android/AndroidManifest.xml index f27872eee472c..25e1db015d26a 100644 --- a/build/android/AndroidManifest.xml +++ b/build/android/AndroidManifest.xml @@ -15,6 +15,6 @@ - + diff --git a/build/android/adb_install_apk.py b/build/android/adb_install_apk.py index 00bd38e1821d7..2d094eea2ab8f 100755 --- a/build/android/adb_install_apk.py +++ b/build/android/adb_install_apk.py @@ -9,6 +9,7 @@ import optparse import os import sys +import time from pylib import constants from pylib.device import device_errors @@ -71,14 +72,28 @@ def main(argv): constants.SetBuildType(options.build_type) ValidateInstallAPKOption(parser, options, args) - devices = device_utils.DeviceUtils.HealthyDevices() + retry_times = 5 + retry_interval = 15 + while retry_times > 0: + devices = device_utils.DeviceUtils.HealthyDevices() + if options.device: + if options.device not in devices: + raise Exception('Error: %s not in attached devices %s' % \ + (options.device, ','.join(devices))) + devices = [options.device] - if options.device: - devices = [d for d in devices if d == options.device] if not devices: - raise device_errors.DeviceUnreachableError(options.device) - elif not devices: - raise device_errors.NoDevicesError() + print 'No connected devices found, '\ + 'kill adb server and retry in %d seconds...' % retry_interval + android_commands.AndroidCommands().KillAdbServer() + time.sleep(retry_interval) + retry_interval *= 2 + retry_times -= 1 + else: + break + + if not devices: + raise Exception('Error: no connected devices') device_utils.DeviceUtils.parallel(devices).Install( options.apk, reinstall=options.keep_data) diff --git a/build/android/gyp/java_cpp_enum.py b/build/android/gyp/java_cpp_enum.py index 16039599ba7aa..c2f1764b1be9a 100755 --- a/build/android/gyp/java_cpp_enum.py +++ b/build/android/gyp/java_cpp_enum.py @@ -15,6 +15,9 @@ # List of C++ types that are compatible with the Java code generated by this # script. +# +# This script can parse .idl files however, at present it ignores special +# rules such as [cpp_enum_prefix_override="ax_attr"]. ENUM_FIXED_TYPE_WHITELIST = ['char', 'unsigned char', 'short', 'unsigned short', 'int', 'int8_t', 'int16_t', 'int32_t', 'uint8_t', 'uint16_t'] @@ -134,8 +137,9 @@ class HeaderParser(object): optional_class_or_struct_re = r'(class|struct)?' enum_name_re = r'(\w+)' optional_fixed_type_re = r'(\:\s*(\w+\s*\w+?))?' - enum_start_re = re.compile(r'^\s*enum\s+' + optional_class_or_struct_re + - '\s*' + enum_name_re + '\s*' + optional_fixed_type_re + '\s*{\s*$') + enum_start_re = re.compile(r'^\s*(?:\[cpp.*\])?\s*enum\s+' + + optional_class_or_struct_re + '\s*' + enum_name_re + '\s*' + + optional_fixed_type_re + '\s*{\s*$') def __init__(self, lines, path=None): self._lines = lines diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py index 259bd55ab24a9..55ab6f63d6702 100755 --- a/build/android/provision_devices.py +++ b/build/android/provision_devices.py @@ -248,7 +248,7 @@ def _PushAndLaunchAdbReboot(device, target): # Launch adb_reboot logging.info(' Launching adb_reboot ...') device.RunShellCommand( - ['/data/local/tmp/adb_reboot'], + [device.GetDevicePieWrapper(), '/data/local/tmp/adb_reboot'], check_return=True) diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py index f7191f7935da2..a4cbc94e7c482 100644 --- a/build/android/pylib/android_commands.py +++ b/build/android/pylib/android_commands.py @@ -512,8 +512,10 @@ def Install(self, package_file_path, reinstall=False): install_cmd = ' '.join(install_cmd) self._LogShell(install_cmd) + # FIXME(wang16): Change the timeout here to five minutes. Revert + # the change when slaves can run kvm enabled x86 android emulators. return self._adb.SendCommand(install_cmd, - timeout_time=2 * 60, + timeout_time=5 * 60, retry_count=0) def ManagedInstall(self, apk_path, keep_data=False, package_name=None, diff --git a/build/android/pylib/constants/__init__.py b/build/android/pylib/constants/__init__.py index cb5f8995e8f27..025860c7e52b6 100644 --- a/build/android/pylib/constants/__init__.py +++ b/build/android/pylib/constants/__init__.py @@ -169,6 +169,8 @@ class ANDROID_SDK_VERSION_CODES(object): http://developer.android.com/reference/android/os/Build.VERSION_CODES.html """ + ICE_CREAM_SANDWICH = 14 + ICE_CREAM_SANDWICH_MR1 = 15 JELLY_BEAN = 16 JELLY_BEAN_MR1 = 17 JELLY_BEAN_MR2 = 18 diff --git a/build/android/pylib/content_settings.py b/build/android/pylib/content_settings.py index 8594140856d87..f039c969ea043 100644 --- a/build/android/pylib/content_settings.py +++ b/build/android/pylib/content_settings.py @@ -14,6 +14,9 @@ class ContentSettings(dict): def __init__(self, table, device): super(ContentSettings, self).__init__() + assert (device.build_version_sdk + >= constants.ANDROID_SDK_VERSION_CODES.JELLY_BEAN), ( + 'ContentSettings supported only on SDK 16 and later') self._table = table self._device = device diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py index 967809ff8e286..28fc64d59fe50 100644 --- a/build/android/pylib/device/device_utils.py +++ b/build/android/pylib/device/device_utils.py @@ -1534,6 +1534,41 @@ def GetLogcatMonitor(self, timeout=None, retries=None, *args, **kwargs): """ return logcat_monitor.LogcatMonitor(self.adb, *args, **kwargs) + @decorators.WithTimeoutAndRetriesFromInstance() + def GetDevicePieWrapper(self, timeout=None, retries=None): + """Gets the absolute path to the run_pie wrapper on the device. + + We have to build our device executables to be PIE, but they need to be able + to run on versions of android that don't support PIE (i.e. ICS and below). + To do so, we push a wrapper to the device that lets older android versions + run PIE executables. This method pushes that wrapper to the device if + necessary and returns the path to it. + + This is exposed publicly to allow clients to write scripts using run_pie + (e.g. md5sum.CalculateDeviceMd5Sum). + + Args: + timeout: timeout in seconds + retries: number of retries + + Returns: + The path to the PIE wrapper on the device, or an empty string if the + device does not require the wrapper. + """ + if 'run_pie' not in self._cache: + pie = '' + if (self.build_version_sdk < + constants.ANDROID_SDK_VERSION_CODES.JELLY_BEAN): + host_pie_path = os.path.join(constants.GetOutDirectory(), 'run_pie') + if not os.path.exists(host_pie_path): + raise device_errors.CommandFailedError('Please build run_pie') + pie = '%s/run_pie' % constants.TEST_EXECUTABLE_DIR + self.adb.Push(host_pie_path, pie) + + self._cache['run_pie'] = pie + + return self._cache['run_pie'] + def GetClientCache(self, client_name): """Returns client cache.""" if client_name not in self._client_caches: diff --git a/build/android/pylib/device/device_utils_test.py b/build/android/pylib/device/device_utils_test.py index 23a1a325e7680..e5e39360366ca 100755 --- a/build/android/pylib/device/device_utils_test.py +++ b/build/android/pylib/device/device_utils_test.py @@ -731,6 +731,24 @@ def testRunPipedShellCommand_outputCutOff(self): self.assertIs(None, ec.exception.status) +class DeviceUtilsGetDevicePieWrapper(DeviceUtilsTest): + + def testGetDevicePieWrapper_jb(self): + with self.assertCall( + self.call.device.build_version_sdk(), + constants.ANDROID_SDK_VERSION_CODES.JELLY_BEAN): + self.assertEqual('', self.device.GetDevicePieWrapper()) + + def testGetDevicePieWrapper_ics(self): + with self.assertCalls( + (self.call.device.build_version_sdk(), + constants.ANDROID_SDK_VERSION_CODES.ICE_CREAM_SANDWICH), + (mock.call.pylib.constants.GetOutDirectory(), '/foo/bar'), + (mock.call.os.path.exists(mock.ANY), True), + (self.call.adb.Push(mock.ANY, mock.ANY), '')): + self.assertNotEqual('', self.device.GetDevicePieWrapper()) + + @mock.patch('time.sleep', mock.Mock()) class DeviceUtilsKillAllTest(DeviceUtilsTest): diff --git a/build/android/pylib/device_settings.py b/build/android/pylib/device_settings.py index 97e966322ce08..73ffa72966da7 100644 --- a/build/android/pylib/device_settings.py +++ b/build/android/pylib/device_settings.py @@ -29,6 +29,16 @@ def ConfigureContentSettings(device, desired_settings): desired_settings: A list of (table, [(key: value), ...]) for all settings to configure. """ + try: + sdk_version = device.build_version_sdk + except device_errors.CommandFailedError as exc: + logging.error('Skipping content settings configuration: %s', str(exc)) + return + + if sdk_version < constants.ANDROID_SDK_VERSION_CODES.JELLY_BEAN: + logging.error('Skipping content settings configuration due to outdated sdk') + return + if device.build_type == 'userdebug': for table, key_value in desired_settings: settings = content_settings.ContentSettings(table, device) diff --git a/build/android/pylib/gtest/test_package_exe.py b/build/android/pylib/gtest/test_package_exe.py index 7cdcb99e5586b..aa3374e29ce05 100644 --- a/build/android/pylib/gtest/test_package_exe.py +++ b/build/android/pylib/gtest/test_package_exe.py @@ -116,8 +116,9 @@ def GetAllTests(self, device): constants.TEST_EXECUTABLE_DIR, '%s_deps' % self.suite_name) cmd = [] - if self.tool.GetTestWrapper(): - cmd.append(self.tool.GetTestWrapper()) + for wrapper in (device.GetDevicePieWrapper(), self.tool.GetTestWrapper()): + if wrapper: + cmd.append(wrapper) cmd.extend([ posixpath.join(constants.TEST_EXECUTABLE_DIR, self.suite_name), '--gtest_list_tests']) diff --git a/build/android/pylib/instrumentation/test_runner.py b/build/android/pylib/instrumentation/test_runner.py index d1c5a4d6bc396..6e8be3419b8fb 100644 --- a/build/android/pylib/instrumentation/test_runner.py +++ b/build/android/pylib/instrumentation/test_runner.py @@ -336,6 +336,9 @@ def RunTest(self, test): timeout = (self._GetIndividualTestTimeoutSecs(test) * self._GetIndividualTestTimeoutScale(test) * self.tool.GetTimeoutScale()) + if (self.device.build_version_sdk + < constants.ANDROID_SDK_VERSION_CODES.JELLY_BEAN): + timeout *= 10 start_ms = 0 duration_ms = 0 diff --git a/build/android/pylib/utils/md5sum.py b/build/android/pylib/utils/md5sum.py index ed2e6bc8a3385..d59245c84544f 100644 --- a/build/android/pylib/utils/md5sum.py +++ b/build/android/pylib/utils/md5sum.py @@ -18,7 +18,7 @@ MD5SUM_DEVICE_SCRIPT_FORMAT = ( 'test -f {path} -o -d {path} ' - '&& LD_LIBRARY_PATH={md5sum_lib} {md5sum_bin} {path}') + '&& LD_LIBRARY_PATH={md5sum_lib} {device_pie_wrapper} {md5sum_bin} {path}') _STARTS_WITH_CHECKSUM_RE = re.compile(r'^\s*[0-9a-fA-f]{32}\s+') @@ -65,9 +65,11 @@ def CalculateDeviceMd5Sums(paths, device): with tempfile.NamedTemporaryFile() as md5sum_script_file: with device_temp_file.DeviceTempFile( device.adb) as md5sum_device_script_file: + device_pie_wrapper = device.GetDevicePieWrapper() md5sum_script = ( MD5SUM_DEVICE_SCRIPT_FORMAT.format( path=p, md5sum_lib=MD5SUM_DEVICE_LIB_PATH, + device_pie_wrapper=device_pie_wrapper, md5sum_bin=MD5SUM_DEVICE_BIN_PATH) for p in paths) md5sum_script_file.write('; '.join(md5sum_script)) diff --git a/build/android/setup.gyp b/build/android/setup.gyp index b3c3422163fd0..7dce19de7266a 100644 --- a/build/android/setup.gyp +++ b/build/android/setup.gyp @@ -16,7 +16,7 @@ { 'destination': '<(SHARED_LIB_DIR)/', 'files': [ - '<(android_libcpp_libs_dir)/libc++_shared.so', + '<(android_stlport_libs_dir)/libstlport_shared.so', ], }, ], diff --git a/build/common.gypi b/build/common.gypi index dfa41639f4dd5..fa69fdd2b7572 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -381,6 +381,11 @@ # Web speech is enabled by default. Set to 0 to disable. 'enable_web_speech%': 1, + # 'Ok Google' hotwording is disabled by default in open source builds. Set + # to 1 to enable. (This will download a closed-source NaCl module at + # startup.) Chrome-branded builds have this enabled by default. + 'enable_hotwording%': 0, + # Notifications are compiled in by default. Set to 0 to disable. 'notifications%' : 1, @@ -562,6 +567,12 @@ # Enable FTP support by default. 'disable_ftp_support%': 0, + # Enable web audio hrtf by default. + 'disable_webaudio_hrtf%': 0, + + # Include all resources by default. + 'use_minimum_resources%': 0, + # Use native android functions in place of ICU. Not supported by most # components. 'use_icu_alternatives_on_android%': 0, @@ -613,8 +624,6 @@ # Platform sends memory pressure signals natively. 'native_memory_pressure_signals%': 0, - 'spdy_proxy_auth_property%' : '', - 'spdy_proxy_auth_value%' : '', 'enable_mdns%' : 0, 'enable_service_discovery%': 0, 'enable_wifi_bootstrapping%': 0, @@ -716,7 +725,7 @@ }], # Flags to use glib. - ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', { + ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', { 'use_glib%': 0, }, { 'use_glib%': 1, @@ -812,6 +821,10 @@ ] }], + ['branding=="Chrome"', { + 'enable_hotwording%': 1, + }], + ['OS=="android"', { 'enable_webrtc%': 1, }], @@ -1136,6 +1149,7 @@ 'configuration_policy%': '<(configuration_policy)', 'safe_browsing%': '<(safe_browsing)', 'enable_web_speech%': '<(enable_web_speech)', + 'enable_hotwording%': '<(enable_hotwording)', 'notifications%': '<(notifications)', 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', 'mac_want_real_dsym%': '<(mac_want_real_dsym)', @@ -1188,6 +1202,8 @@ 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)', 'disable_file_support%': '<(disable_file_support)', 'disable_ftp_support%': '<(disable_ftp_support)', + 'disable_webaudio_hrtf%': '<(disable_webaudio_hrtf)', + 'use_minimum_resources%': '<(use_minimum_resources)', 'use_icu_alternatives_on_android%': '<(use_icu_alternatives_on_android)', 'enable_task_manager%': '<(enable_task_manager)', 'sas_dll_path%': '<(sas_dll_path)', @@ -1206,8 +1222,6 @@ 'google_default_client_secret%': '<(google_default_client_secret)', 'enable_supervised_users%': '<(enable_supervised_users)', 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)', - 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)', - 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)', 'enable_mdns%' : '<(enable_mdns)', 'enable_service_discovery%' : '<(enable_service_discovery)', 'enable_wifi_bootstrapping%': '<(enable_wifi_bootstrapping)', @@ -1692,7 +1706,7 @@ 'android_ndk_absolute_root%': '<(android_ndk_absolute_root)', 'android_sdk_root%': '<(android_sdk_root)', 'android_sdk_version%': '<(android_sdk_version)', - 'android_libcpp_root': '<(android_ndk_root)/sources/cxx-stl/llvm-libc++', + 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport', 'host_os%': '<(host_os)', 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)', @@ -1768,9 +1782,9 @@ 'android_sdk%': '<(android_sdk)', 'android_sdk_jar%': '<(android_sdk)/android.jar', - 'android_libcpp_root': '<(android_libcpp_root)', - 'android_libcpp_include': '<(android_libcpp_root)/libcxx/include', - 'android_libcpp_libs_dir': '<(android_libcpp_root)/libs/<(android_app_abi)', + 'android_stlport_root': '<(android_stlport_root)', + 'android_stlport_include': '<(android_stlport_root)/stlport', + 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)', 'host_os%': '<(host_os)', # Location of the "objcopy" binary, used by both gyp and scripts. @@ -2129,6 +2143,12 @@ ['use_concatenated_impulse_responses==1', { 'grit_defines': ['-D', 'use_concatenated_impulse_responses'], }], + ['disable_webaudio_hrtf==1', { + 'grit_defines': ['-D', 'disable_webaudio_hrtf'], + }], + ['use_minimum_resources==1', { + 'grit_defines': ['-D', 'use_minimum_resources'], + }], ['enable_media_router==1', { 'grit_defines': ['-D', 'enable_media_router'], }], @@ -2427,6 +2447,10 @@ # Whether to allow building of chromoting related isolates. 'archive_chromoting_tests%': 0, + + # Flags to enable Murphy resource policy daemon integration on Tizen. + 'tizen%': 0, + 'enable_murphy%': 0, }, 'target_defaults': { 'variables': { @@ -2972,15 +2996,12 @@ ['disable_ftp_support==1', { 'defines': ['DISABLE_FTP_SUPPORT=1'], }], + ['use_minimum_resources==1', { + 'defines': ['USE_MINIMUM_RESOURCES=1'], + }], ['enable_supervised_users==1', { 'defines': ['ENABLE_SUPERVISED_USERS=1'], }], - ['spdy_proxy_auth_property != ""', { - 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'], - }], - ['spdy_proxy_auth_value != ""', { - 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'], - }], ['enable_mdns==1', { 'defines': ['ENABLE_MDNS=1'], }], @@ -4644,9 +4665,9 @@ # Figure this out early since it needs symbols from libgcc.a, so it # has to be before that in the set of libraries. ['component=="shared_library"', { - 'android_libcpp_library': 'c++_shared', + 'android_stlport_library': 'stlport_shared', }, { - 'android_libcpp_library': 'c++_static', + 'android_stlport_library': 'stlport_static', }], ], @@ -4726,17 +4747,17 @@ '-finline-limit=64', '<@(release_extra_cflags)', '--sysroot=<(android_ndk_sysroot)', - # NOTE: The libc++ header include paths below are specified in + # NOTE: The stlport header include paths below are specified in # cflags rather than include_dirs because they need to come # after include_dirs. # The include ordering here is important; change with caution. - '-isystem<(android_libcpp_include)', - '-isystem<(android_ndk_root)/sources/cxx-stl/llvm-libc++abi/libcxxabi/include', - '-isystem<(android_ndk_root)/sources/android/support/include', + '-isystem<(android_stlport_include)', ], 'defines': [ 'ANDROID', '__GNU_SOURCE=1', # Necessary for clone() + 'USE_STLPORT=1', + '_STLP_USE_PTR_SPECIALIZATIONS=1', 'CHROME_BUILD_ID="<(chrome_build_id)"', # The NDK has these things, but doesn't define the constants # to say that it does. Define them here instead. @@ -4749,11 +4770,11 @@ '-Wl,--no-undefined', '--sysroot=<(android_ndk_sysroot)', '-nostdlib', - '-L<(android_libcpp_libs_dir)', - # Don't allow visible symbols from libgcc or libc++ to be + '-L<(android_stlport_libs_dir)', + # Don't allow visible symbols from libgcc or stlport to be # re-exported. '-Wl,--exclude-libs=libgcc.a', - '-Wl,--exclude-libs=libc++_static.a', + '-Wl,--exclude-libs=libstlport_static.a', # Don't allow visible symbols from libraries that contain # assembly code with symbols that aren't hidden properly. # http://crbug.com/448386 @@ -4766,8 +4787,7 @@ '-Wl,--exclude-libs=libvpx.a', ], 'libraries': [ - '-l<(android_libcpp_library)', - '-latomic', + '-l<(android_stlport_library)', # Manually link the libgcc.a that the cross compiler uses. ' #include "cc/blink/web_filter_operations_impl.h" -#include "cc/resources/clip_display_item.h" -#include "cc/resources/clip_path_display_item.h" -#include "cc/resources/compositing_display_item.h" -#include "cc/resources/drawing_display_item.h" -#include "cc/resources/filter_display_item.h" -#include "cc/resources/float_clip_display_item.h" -#include "cc/resources/transform_display_item.h" +#include "cc/playback/clip_display_item.h" +#include "cc/playback/clip_path_display_item.h" +#include "cc/playback/compositing_display_item.h" +#include "cc/playback/drawing_display_item.h" +#include "cc/playback/filter_display_item.h" +#include "cc/playback/float_clip_display_item.h" +#include "cc/playback/transform_display_item.h" #include "skia/ext/refptr.h" #include "third_party/WebKit/public/platform/WebFloatRect.h" #include "third_party/WebKit/public/platform/WebRect.h" diff --git a/cc/blink/web_display_item_list_impl.h b/cc/blink/web_display_item_list_impl.h index ff94ee332eca7..6b5d147b5d1f9 100644 --- a/cc/blink/web_display_item_list_impl.h +++ b/cc/blink/web_display_item_list_impl.h @@ -7,7 +7,7 @@ #include "base/memory/ref_counted.h" #include "cc/blink/cc_blink_export.h" -#include "cc/resources/display_item_list.h" +#include "cc/playback/display_item_list.h" #include "third_party/WebKit/public/platform/WebDisplayItemList.h" #include "third_party/WebKit/public/platform/WebVector.h" #include "third_party/skia/include/core/SkRegion.h" diff --git a/cc/cc.gyp b/cc/cc.gyp index f66c5ea99a291..2a4d66a267ee0 100644 --- a/cc/cc.gyp +++ b/cc/cc.gyp @@ -291,6 +291,8 @@ 'output/gl_renderer_draw_cache.h', 'output/latency_info_swap_promise.cc', 'output/latency_info_swap_promise.h', + 'output/layer_quad.cc', + 'output/layer_quad.h', 'output/managed_memory_policy.cc', 'output/managed_memory_policy.h', 'output/output_surface.cc', @@ -328,9 +330,47 @@ 'output/static_geometry_binding.cc', 'output/static_geometry_binding.h', 'output/swap_promise.h', + 'output/texture_mailbox_deleter.cc', + 'output/texture_mailbox_deleter.h', 'output/viewport_selection_bound.cc', 'output/viewport_selection_bound.h', 'output/vsync_parameter_observer.h', + 'playback/clip_display_item.cc', + 'playback/clip_display_item.h', + 'playback/clip_path_display_item.cc', + 'playback/clip_path_display_item.h', + 'playback/compositing_display_item.cc', + 'playback/compositing_display_item.h', + 'playback/display_item.cc', + 'playback/display_item.h', + 'playback/display_item_list.cc', + 'playback/display_item_list.h', + 'playback/display_list_raster_source.cc', + 'playback/display_list_raster_source.h', + 'playback/display_list_recording_source.cc', + 'playback/display_list_recording_source.h', + 'playback/drawing_display_item.cc', + 'playback/drawing_display_item.h', + 'playback/filter_display_item.cc', + 'playback/filter_display_item.h', + 'playback/float_clip_display_item.cc', + 'playback/float_clip_display_item.h', + 'playback/largest_display_item.cc', + 'playback/largest_display_item.h', + 'playback/picture.cc', + 'playback/picture.h', + 'playback/picture_pile.cc', + 'playback/picture_pile.h', + 'playback/picture_pile_impl.cc', + 'playback/picture_pile_impl.h', + 'playback/pixel_ref_map.cc', + 'playback/pixel_ref_map.h', + 'playback/raster_source.h', + 'playback/raster_source_helper.cc', + 'playback/raster_source_helper.h', + 'playback/recording_source.h', + 'playback/transform_display_item.cc', + 'playback/transform_display_item.h', 'quads/checkerboard_draw_quad.cc', 'quads/checkerboard_draw_quad.h', 'quads/content_draw_quad_base.cc', @@ -369,90 +409,52 @@ 'quads/tile_draw_quad.h', 'quads/yuv_video_draw_quad.cc', 'quads/yuv_video_draw_quad.h', + 'raster/bitmap_tile_task_worker_pool.cc', + 'raster/bitmap_tile_task_worker_pool.h', + 'raster/gpu_rasterizer.cc', + 'raster/gpu_rasterizer.h', + 'raster/gpu_tile_task_worker_pool.cc', + 'raster/gpu_tile_task_worker_pool.h', + 'raster/one_copy_tile_task_worker_pool.cc', + 'raster/one_copy_tile_task_worker_pool.h', + 'raster/pixel_buffer_tile_task_worker_pool.cc', + 'raster/pixel_buffer_tile_task_worker_pool.h', + 'raster/raster_buffer.cc', + 'raster/raster_buffer.h', + 'raster/scoped_gpu_raster.cc', + 'raster/scoped_gpu_raster.h', + 'raster/task_graph_runner.cc', + 'raster/task_graph_runner.h', + 'raster/texture_compressor.cc', + 'raster/texture_compressor.h', + 'raster/texture_compressor_etc1.cc', + 'raster/texture_compressor_etc1.h', + 'raster/tile_task_runner.cc', + 'raster/tile_task_runner.h', + 'raster/tile_task_worker_pool.cc', + 'raster/tile_task_worker_pool.h', + 'raster/zero_copy_tile_task_worker_pool.cc', + 'raster/zero_copy_tile_task_worker_pool.h', 'resources/bitmap_content_layer_updater.cc', 'resources/bitmap_content_layer_updater.h', 'resources/bitmap_skpicture_content_layer_updater.cc', 'resources/bitmap_skpicture_content_layer_updater.h', - 'resources/bitmap_tile_task_worker_pool.cc', - 'resources/bitmap_tile_task_worker_pool.h', - 'resources/clip_display_item.cc', - 'resources/clip_display_item.h', - 'resources/clip_path_display_item.cc', - 'resources/clip_path_display_item.h', - 'resources/compositing_display_item.cc', - 'resources/compositing_display_item.h', 'resources/content_layer_updater.cc', 'resources/content_layer_updater.h', - 'resources/display_item.cc', - 'resources/display_item.h', - 'resources/display_item_list.cc', - 'resources/display_item_list.h', - 'resources/display_list_raster_source.cc', - 'resources/display_list_raster_source.h', - 'resources/display_list_recording_source.cc', - 'resources/display_list_recording_source.h', - 'resources/drawing_display_item.cc', - 'resources/drawing_display_item.h', - 'resources/eviction_tile_priority_queue.cc', - 'resources/eviction_tile_priority_queue.h', - 'resources/filter_display_item.cc', - 'resources/filter_display_item.h', - 'resources/float_clip_display_item.cc', - 'resources/float_clip_display_item.h', - 'resources/gpu_rasterizer.cc', - 'resources/gpu_rasterizer.h', - 'resources/gpu_tile_task_worker_pool.cc', - 'resources/gpu_tile_task_worker_pool.h', 'resources/image_layer_updater.cc', 'resources/image_layer_updater.h', - 'resources/largest_display_item.cc', - 'resources/largest_display_item.h', 'resources/layer_painter.h', - 'resources/layer_quad.cc', - 'resources/layer_quad.h', - 'resources/layer_tiling_data.cc', - 'resources/layer_tiling_data.h', 'resources/layer_updater.cc', 'resources/layer_updater.h', 'resources/memory_history.cc', 'resources/memory_history.h', - 'resources/one_copy_tile_task_worker_pool.cc', - 'resources/one_copy_tile_task_worker_pool.h', - 'resources/picture.cc', - 'resources/picture.h', - 'resources/picture_layer_tiling.cc', - 'resources/picture_layer_tiling.h', - 'resources/picture_layer_tiling_set.cc', - 'resources/picture_layer_tiling_set.h', - 'resources/picture_pile.cc', - 'resources/picture_pile.h', - 'resources/picture_pile_impl.cc', - 'resources/picture_pile_impl.h', - 'resources/pixel_buffer_tile_task_worker_pool.cc', - 'resources/pixel_buffer_tile_task_worker_pool.h', - 'resources/pixel_ref_map.cc', - 'resources/pixel_ref_map.h', 'resources/platform_color.h', 'resources/prioritized_resource.cc', 'resources/prioritized_resource.h', 'resources/prioritized_resource_manager.cc', 'resources/prioritized_resource_manager.h', - 'resources/prioritized_tile.cc', - 'resources/prioritized_tile.h', 'resources/priority_calculator.cc', 'resources/priority_calculator.h', - 'resources/raster_buffer.cc', - 'resources/raster_buffer.h', - 'resources/raster_source.h', - 'resources/raster_source_helper.cc', - 'resources/raster_source_helper.h', - 'resources/raster_tile_priority_queue.cc', - 'resources/raster_tile_priority_queue.h', - 'resources/raster_tile_priority_queue_all.cc', - 'resources/raster_tile_priority_queue_all.h', - 'resources/raster_tile_priority_queue_required.cc', - 'resources/raster_tile_priority_queue_required.h', - 'resources/recording_source.h', 'resources/release_callback.h', 'resources/resource.cc', 'resources/resource.h', @@ -469,8 +471,6 @@ 'resources/resource_update_queue.cc', 'resources/resource_update_queue.h', 'resources/returned_resource.h', - 'resources/scoped_gpu_raster.cc', - 'resources/scoped_gpu_raster.h', 'resources/scoped_resource.cc', 'resources/scoped_resource.h', 'resources/scoped_ui_resource.cc', @@ -484,40 +484,12 @@ 'resources/single_release_callback_impl.h', 'resources/skpicture_content_layer_updater.cc', 'resources/skpicture_content_layer_updater.h', - 'resources/task_graph_runner.cc', - 'resources/task_graph_runner.h', - 'resources/texture_compressor.cc', - 'resources/texture_compressor.h', - 'resources/texture_compressor_etc1.cc', - 'resources/texture_compressor_etc1.h', 'resources/texture_mailbox.cc', 'resources/texture_mailbox.h', - 'resources/texture_mailbox_deleter.cc', - 'resources/texture_mailbox_deleter.h', 'resources/texture_uploader.cc', 'resources/texture_uploader.h', - 'resources/tile.cc', - 'resources/tile.h', - 'resources/tile_draw_info.cc', - 'resources/tile_draw_info.h', - 'resources/tile_manager.cc', - 'resources/tile_manager.h', - 'resources/tile_priority.cc', - 'resources/tile_priority.h', - 'resources/tile_task_runner.cc', - 'resources/tile_task_runner.h', - 'resources/tile_task_worker_pool.cc', - 'resources/tile_task_worker_pool.h', - 'resources/tiling_set_eviction_queue.cc', - 'resources/tiling_set_eviction_queue.h', - 'resources/tiling_set_raster_queue_all.cc', - 'resources/tiling_set_raster_queue_all.h', - 'resources/tiling_set_raster_queue_required.cc', - 'resources/tiling_set_raster_queue_required.h', 'resources/transferable_resource.cc', 'resources/transferable_resource.h', - 'resources/transform_display_item.cc', - 'resources/transform_display_item.h', 'resources/ui_resource_bitmap.cc', 'resources/ui_resource_bitmap.h', 'resources/ui_resource_client.h', @@ -525,8 +497,6 @@ 'resources/ui_resource_request.h', 'resources/video_resource_updater.cc', 'resources/video_resource_updater.h', - 'resources/zero_copy_tile_task_worker_pool.cc', - 'resources/zero_copy_tile_task_worker_pool.h', 'scheduler/begin_frame_source.cc', 'scheduler/begin_frame_source.h', 'scheduler/commit_earlyout_reason.h', @@ -540,6 +510,36 @@ 'scheduler/scheduler_state_machine.cc', 'scheduler/scheduler_state_machine.h', 'scheduler/video_frame_controller.h', + 'tiles/eviction_tile_priority_queue.cc', + 'tiles/eviction_tile_priority_queue.h', + 'tiles/layer_tiling_data.cc', + 'tiles/layer_tiling_data.h', + 'tiles/picture_layer_tiling.cc', + 'tiles/picture_layer_tiling.h', + 'tiles/picture_layer_tiling_set.cc', + 'tiles/picture_layer_tiling_set.h', + 'tiles/prioritized_tile.cc', + 'tiles/prioritized_tile.h', + 'tiles/raster_tile_priority_queue.cc', + 'tiles/raster_tile_priority_queue.h', + 'tiles/raster_tile_priority_queue_all.cc', + 'tiles/raster_tile_priority_queue_all.h', + 'tiles/raster_tile_priority_queue_required.cc', + 'tiles/raster_tile_priority_queue_required.h', + 'tiles/tile.cc', + 'tiles/tile.h', + 'tiles/tile_draw_info.cc', + 'tiles/tile_draw_info.h', + 'tiles/tile_manager.cc', + 'tiles/tile_manager.h', + 'tiles/tile_priority.cc', + 'tiles/tile_priority.h', + 'tiles/tiling_set_eviction_queue.cc', + 'tiles/tiling_set_eviction_queue.h', + 'tiles/tiling_set_raster_queue_all.cc', + 'tiles/tiling_set_raster_queue_all.h', + 'tiles/tiling_set_raster_queue_required.cc', + 'tiles/tiling_set_raster_queue_required.h', 'trees/blocking_task_runner.cc', 'trees/blocking_task_runner.h', 'trees/damage_tracker.cc', @@ -660,8 +660,8 @@ ], 'sources': [ # Conditional compilation for SSE2 code on x86 and x64 machines - 'resources/texture_compressor_etc1_sse.cc', - 'resources/texture_compressor_etc1_sse.h', + 'raster/texture_compressor_etc1_sse.cc', + 'raster/texture_compressor_etc1_sse.h', ], 'cflags': [ '-msse2', diff --git a/cc/cc_tests.gyp b/cc/cc_tests.gyp index 6d34554b2fa06..5ded2b81fc57b 100644 --- a/cc/cc_tests.gyp +++ b/cc/cc_tests.gyp @@ -66,39 +66,35 @@ 'output/delegating_renderer_unittest.cc', 'output/filter_operations_unittest.cc', 'output/gl_renderer_unittest.cc', + 'output/layer_quad_unittest.cc', 'output/output_surface_unittest.cc', 'output/overlay_unittest.cc', 'output/renderer_pixeltest.cc', 'output/renderer_unittest.cc', 'output/shader_unittest.cc', 'output/software_renderer_unittest.cc', + 'output/texture_mailbox_deleter_unittest.cc', + 'playback/display_item_list_unittest.cc', + 'playback/display_list_recording_source_unittest.cc', + 'playback/picture_pile_impl_unittest.cc', + 'playback/picture_pile_unittest.cc', + 'playback/picture_unittest.cc', + 'playback/pixel_ref_map_unittest.cc', + 'playback/recording_source_unittest.cc', 'quads/draw_polygon_unittest.cc', 'quads/draw_quad_unittest.cc', 'quads/list_container_unittest.cc', 'quads/render_pass_unittest.cc', - 'resources/display_list_recording_source_unittest.cc', - 'resources/display_item_list_unittest.cc', - 'resources/layer_quad_unittest.cc', - 'resources/picture_layer_tiling_set_unittest.cc', - 'resources/picture_layer_tiling_unittest.cc', - 'resources/picture_pile_impl_unittest.cc', - 'resources/picture_pile_unittest.cc', - 'resources/picture_unittest.cc', - 'resources/pixel_ref_map_unittest.cc', + 'raster/scoped_gpu_raster_unittest.cc', + 'raster/task_graph_runner_unittest.cc', + 'raster/texture_compressor_etc1_unittest.cc', + 'raster/tile_task_worker_pool_unittest.cc', 'resources/platform_color_unittest.cc', 'resources/prioritized_resource_unittest.cc', - 'resources/recording_source_unittest.cc', 'resources/resource_provider_unittest.cc', 'resources/resource_update_controller_unittest.cc', - 'resources/scoped_gpu_raster_unittest.cc', 'resources/scoped_resource_unittest.cc', - 'resources/task_graph_runner_unittest.cc', - 'resources/texture_compressor_etc1_unittest.cc', - 'resources/texture_mailbox_deleter_unittest.cc', 'resources/texture_uploader_unittest.cc', - 'resources/tile_manager_unittest.cc', - 'resources/tile_priority_unittest.cc', - 'resources/tile_task_worker_pool_unittest.cc', 'resources/video_resource_updater_unittest.cc', 'scheduler/begin_frame_source_unittest.cc', 'scheduler/delay_based_time_source_unittest.cc', @@ -107,6 +103,10 @@ 'test/layer_tree_json_parser_unittest.cc', 'test/ordered_simple_task_runner_unittest.cc', 'test/test_web_graphics_context_3d_unittest.cc', + 'tiles/picture_layer_tiling_set_unittest.cc', + 'tiles/picture_layer_tiling_unittest.cc', + 'tiles/tile_manager_unittest.cc', + 'tiles/tile_priority_unittest.cc', 'trees/blocking_task_runner_unittest.cc', 'trees/damage_tracker_unittest.cc', 'trees/layer_tree_host_common_unittest.cc', @@ -356,15 +356,15 @@ # Note: sources list duplicated in GN build. 'layers/layer_perftest.cc', 'layers/picture_layer_impl_perftest.cc', - 'resources/picture_layer_tiling_perftest.cc', - 'resources/picture_pile_impl_perftest.cc', - 'resources/task_graph_runner_perftest.cc', - 'resources/texture_compressor_perftest.cc', - 'resources/tile_manager_perftest.cc', - 'resources/tile_task_worker_pool_perftest.cc', + 'playback/picture_pile_impl_perftest.cc', + 'raster/task_graph_runner_perftest.cc', + 'raster/texture_compressor_perftest.cc', + 'raster/tile_task_worker_pool_perftest.cc', 'surfaces/surface_aggregator_perftest.cc', 'test/cc_test_suite.cc', 'test/run_all_perftests.cc', + 'tiles/picture_layer_tiling_perftest.cc', + 'tiles/tile_manager_perftest.cc', 'trees/layer_tree_host_common_perftest.cc', 'trees/layer_tree_host_perftest.cc', 'trees/occlusion_tracker_perftest.cc', diff --git a/cc/cc_unittests.isolate b/cc/cc_unittests.isolate index 7c359d04462e9..6a16fcd5e9c1d 100644 --- a/cc/cc_unittests.isolate +++ b/cc/cc_unittests.isolate @@ -46,7 +46,6 @@ ['OS=="linux"', { 'variables': { 'files': [ - '<(PRODUCT_DIR)/libffmpegsumo.so', '<(PRODUCT_DIR)/libosmesa.so', ], }, @@ -54,7 +53,6 @@ ['OS=="mac"', { 'variables': { 'files': [ - '<(PRODUCT_DIR)/ffmpegsumo.so', '<(PRODUCT_DIR)/osmesa.so', ], }, @@ -62,7 +60,6 @@ ['OS=="win"', { 'variables': { 'files': [ - '<(PRODUCT_DIR)/ffmpegsumo.dll', '<(PRODUCT_DIR)/osmesa.dll', ], }, diff --git a/cc/debug/frame_viewer_instrumentation.h b/cc/debug/frame_viewer_instrumentation.h index 364f9ef0850a4..773e8c55d1d26 100644 --- a/cc/debug/frame_viewer_instrumentation.h +++ b/cc/debug/frame_viewer_instrumentation.h @@ -6,8 +6,8 @@ #define CC_DEBUG_FRAME_VIEWER_INSTRUMENTATION_H_ #include "base/trace_event/trace_event.h" -#include "cc/resources/tile.h" -#include "cc/resources/tile_priority.h" +#include "cc/tiles/tile.h" +#include "cc/tiles/tile_priority.h" namespace cc { namespace frame_viewer_instrumentation { diff --git a/cc/debug/picture_record_benchmark.cc b/cc/debug/picture_record_benchmark.cc index 3ef4708f36ed0..d8608c538ff7e 100644 --- a/cc/debug/picture_record_benchmark.cc +++ b/cc/debug/picture_record_benchmark.cc @@ -10,7 +10,7 @@ #include "base/values.h" #include "cc/layers/layer.h" #include "cc/layers/picture_layer.h" -#include "cc/resources/picture.h" +#include "cc/playback/picture.h" #include "cc/trees/layer_tree_host.h" #include "cc/trees/layer_tree_host_common.h" #include "ui/gfx/geometry/rect.h" diff --git a/cc/debug/rasterize_and_record_benchmark.cc b/cc/debug/rasterize_and_record_benchmark.cc index 4b98dfa75fcbc..c843985604365 100644 --- a/cc/debug/rasterize_and_record_benchmark.cc +++ b/cc/debug/rasterize_and_record_benchmark.cc @@ -16,8 +16,8 @@ #include "cc/layers/content_layer_client.h" #include "cc/layers/layer.h" #include "cc/layers/picture_layer.h" -#include "cc/resources/display_item_list.h" -#include "cc/resources/picture_pile.h" +#include "cc/playback/display_item_list.h" +#include "cc/playback/picture_pile.h" #include "cc/trees/layer_tree_host.h" #include "cc/trees/layer_tree_host_common.h" #include "third_party/skia/include/utils/SkPictureUtils.h" diff --git a/cc/debug/rasterize_and_record_benchmark.h b/cc/debug/rasterize_and_record_benchmark.h index 9215f2df6c8ee..207254f24c6a8 100644 --- a/cc/debug/rasterize_and_record_benchmark.h +++ b/cc/debug/rasterize_and_record_benchmark.h @@ -13,7 +13,7 @@ #include "base/single_thread_task_runner.h" #include "base/time/time.h" #include "cc/debug/micro_benchmark_controller.h" -#include "cc/resources/picture.h" +#include "cc/playback/picture.h" namespace base { class DictionaryValue; diff --git a/cc/debug/rasterize_and_record_benchmark_impl.cc b/cc/debug/rasterize_and_record_benchmark_impl.cc index 10658528da725..1f9a36b871f43 100644 --- a/cc/debug/rasterize_and_record_benchmark_impl.cc +++ b/cc/debug/rasterize_and_record_benchmark_impl.cc @@ -12,7 +12,7 @@ #include "cc/debug/lap_timer.h" #include "cc/layers/layer_impl.h" #include "cc/layers/picture_layer_impl.h" -#include "cc/resources/tile_task_worker_pool.h" +#include "cc/raster/tile_task_worker_pool.h" #include "cc/trees/layer_tree_host_common.h" #include "cc/trees/layer_tree_host_impl.h" #include "cc/trees/layer_tree_impl.h" @@ -170,8 +170,7 @@ void RasterizeAndRecordBenchmarkImpl::RunOnLayer(PictureLayerImpl* layer) { // really matter. const LayerTreeSettings& settings = layer->layer_tree_impl()->settings(); scoped_ptr tiling_set = PictureLayerTilingSet::Create( - layer->GetTree(), &client, - settings.tiling_interest_area_viewport_multiplier, + layer->GetTree(), &client, settings.max_tiles_for_interest_area, settings.skewport_target_time_in_seconds, settings.skewport_extrapolation_limit_in_content_pixels); diff --git a/cc/debug/rasterize_and_record_benchmark_impl.h b/cc/debug/rasterize_and_record_benchmark_impl.h index 06224daea99f4..0ab954382568a 100644 --- a/cc/debug/rasterize_and_record_benchmark_impl.h +++ b/cc/debug/rasterize_and_record_benchmark_impl.h @@ -12,7 +12,7 @@ #include "base/single_thread_task_runner.h" #include "base/time/time.h" #include "cc/debug/micro_benchmark_impl.h" -#include "cc/resources/task_graph_runner.h" +#include "cc/raster/task_graph_runner.h" namespace cc { diff --git a/cc/debug/traced_picture.h b/cc/debug/traced_picture.h index b9d232dc33289..0cb044e7212d9 100644 --- a/cc/debug/traced_picture.h +++ b/cc/debug/traced_picture.h @@ -9,7 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "base/trace_event/trace_event.h" -#include "cc/resources/picture.h" +#include "cc/playback/picture.h" namespace cc { diff --git a/cc/layers/content_layer_client.h b/cc/layers/content_layer_client.h index 86b5264093b24..9125b9722b5b8 100644 --- a/cc/layers/content_layer_client.h +++ b/cc/layers/content_layer_client.h @@ -6,7 +6,7 @@ #define CC_LAYERS_CONTENT_LAYER_CLIENT_H_ #include "cc/base/cc_export.h" -#include "cc/resources/display_item_list.h" +#include "cc/playback/display_item_list.h" class SkCanvas; diff --git a/cc/layers/delegated_renderer_layer_impl.cc b/cc/layers/delegated_renderer_layer_impl.cc index 63039fb1cdca3..a99cd17b2c7bf 100644 --- a/cc/layers/delegated_renderer_layer_impl.cc +++ b/cc/layers/delegated_renderer_layer_impl.cc @@ -78,6 +78,7 @@ void DelegatedRendererLayerImpl::PushPropertiesTo(LayerImpl* layer) { own_child_id_ = false; if (have_render_passes_to_push_) { + DCHECK(child_id_); // This passes ownership of the render passes to the active tree. delegated_layer->SetRenderPasses(&render_passes_in_draw_order_); // Once resources are on the active tree, give them to the ResourceProvider @@ -216,6 +217,7 @@ scoped_ptr DelegatedRendererLayerImpl::CreateLayerImpl( void DelegatedRendererLayerImpl::ReleaseResources() { ClearRenderPasses(); ClearChildId(); + have_render_passes_to_push_ = false; } static inline int IndexToId(int index) { return index + 1; } diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc index 23c90c2a7ff85..9a10f5d55bec2 100644 --- a/cc/layers/layer.cc +++ b/cc/layers/layer.cc @@ -53,6 +53,7 @@ Layer::Layer() transform_tree_index_(-1), opacity_tree_index_(-1), clip_tree_index_(-1), + property_tree_sequence_number_(-1), num_layer_or_descendants_with_copy_request_(0), num_layer_or_descendants_with_input_handler_(0), should_flatten_transform_from_property_tree_(false), @@ -123,6 +124,11 @@ void Layer::SetLayerTreeHost(LayerTreeHost* host) { if (layer_tree_host_) layer_tree_host_->property_trees()->needs_rebuild = true; + if (host) + host->property_trees()->needs_rebuild = true; + + InvalidatePropertyTreesIndices(); + layer_tree_host_ = host; // When changing hosts, the layer needs to commit its properties to the impl @@ -256,6 +262,9 @@ void Layer::SetParent(Layer* layer) { if (!layer_tree_host_) return; + + layer_tree_host_->property_trees()->needs_rebuild = true; + const LayerTreeSettings& settings = layer_tree_host_->settings(); if (!settings.layer_transforms_should_scale_layer_contents) return; @@ -984,6 +993,64 @@ void Layer::Set3dSortingContextId(int id) { SetNeedsCommit(); } +void Layer::SetTransformTreeIndex(int index) { + DCHECK(IsPropertyChangeAllowed()); + if (transform_tree_index_ == index) + return; + transform_tree_index_ = index; + SetNeedsPushProperties(); +} + +int Layer::transform_tree_index() const { + if (!layer_tree_host_ || + layer_tree_host_->property_trees()->sequence_number != + property_tree_sequence_number_) { + return -1; + } + return transform_tree_index_; +} + +void Layer::SetClipTreeIndex(int index) { + DCHECK(IsPropertyChangeAllowed()); + if (clip_tree_index_ == index) + return; + clip_tree_index_ = index; + SetNeedsPushProperties(); +} + +int Layer::clip_tree_index() const { + if (!layer_tree_host_ || + layer_tree_host_->property_trees()->sequence_number != + property_tree_sequence_number_) { + return -1; + } + return clip_tree_index_; +} + +void Layer::SetOpacityTreeIndex(int index) { + DCHECK(IsPropertyChangeAllowed()); + if (opacity_tree_index_ == index) + return; + opacity_tree_index_ = index; + SetNeedsPushProperties(); +} + +int Layer::opacity_tree_index() const { + if (!layer_tree_host_ || + layer_tree_host_->property_trees()->sequence_number != + property_tree_sequence_number_) { + return -1; + } + return opacity_tree_index_; +} + +void Layer::InvalidatePropertyTreesIndices() { + int invalid_property_tree_index = -1; + SetTransformTreeIndex(invalid_property_tree_index); + SetClipTreeIndex(invalid_property_tree_index); + SetOpacityTreeIndex(invalid_property_tree_index); +} + void Layer::SetShouldFlattenTransform(bool should_flatten) { DCHECK(IsPropertyChangeAllowed()); if (should_flatten_transform_ == should_flatten) @@ -1128,9 +1195,9 @@ void Layer::PushPropertiesTo(LayerImpl* layer) { DCHECK(!(TransformIsAnimating() && layer->TransformIsAnimatingOnImplOnly())); layer->Set3dSortingContextId(sorting_context_id_); layer->SetNumDescendantsThatDrawContent(num_descendants_that_draw_content_); - layer->set_transform_tree_index(transform_tree_index_); - layer->set_opacity_tree_index(opacity_tree_index_); - layer->set_clip_tree_index(clip_tree_index_); + layer->SetTransformTreeIndex(transform_tree_index()); + layer->SetOpacityTreeIndex(opacity_tree_index()); + layer->SetClipTreeIndex(clip_tree_index()); layer->set_offset_to_transform_parent(offset_to_transform_parent_); layer->SetScrollClipLayer(scroll_clip_layer_id_); @@ -1355,7 +1422,7 @@ void Layer::OnOpacityAnimated(float opacity) { if (layer_tree_host_) { if (OpacityNode* node = layer_tree_host_->property_trees()->opacity_tree.Node( - opacity_tree_index_)) { + opacity_tree_index())) { if (node->owner_id == id()) node->data = opacity; } @@ -1370,7 +1437,7 @@ void Layer::OnTransformAnimated(const gfx::Transform& transform) { if (layer_tree_host_) { if (TransformNode* node = layer_tree_host_->property_trees()->transform_tree.Node( - transform_tree_index_)) { + transform_tree_index())) { if (node->owner_id == id()) { node->data.local = transform; node->data.needs_local_transform_update = true; diff --git a/cc/layers/layer.h b/cc/layers/layer.h index 56decaa741a2d..2e4f172292fe4 100644 --- a/cc/layers/layer.h +++ b/cc/layers/layer.h @@ -476,27 +476,18 @@ class CC_EXPORT Layer : public base::RefCounted, void Set3dSortingContextId(int id); int sorting_context_id() const { return sorting_context_id_; } - void set_transform_tree_index(int index) { - if (transform_tree_index_ == index) - return; - transform_tree_index_ = index; - SetNeedsPushProperties(); - } - void set_clip_tree_index(int index) { - if (clip_tree_index_ == index) - return; - clip_tree_index_ = index; - SetNeedsPushProperties(); - } - void set_opacity_tree_index(int index) { - if (opacity_tree_index_ == index) - return; - opacity_tree_index_ = index; - SetNeedsPushProperties(); + void set_property_tree_sequence_number(int sequence_number) { + property_tree_sequence_number_ = sequence_number; } - int clip_tree_index() const { return clip_tree_index_; } - int transform_tree_index() const { return transform_tree_index_; } - int opacity_tree_index() const { return opacity_tree_index_; } + + void SetTransformTreeIndex(int index); + int transform_tree_index() const; + + void SetClipTreeIndex(int index); + int clip_tree_index() const; + + void SetOpacityTreeIndex(int index); + int opacity_tree_index() const; void set_offset_to_transform_parent(gfx::Vector2dF offset) { if (offset_to_transform_parent_ == offset) @@ -683,6 +674,10 @@ class CC_EXPORT Layer : public base::RefCounted, // children. void RemoveFromClipTree(); + // When we detach or attach layer to new LayerTreeHost, all property trees' + // indices becomes invalid. + void InvalidatePropertyTreesIndices(); + void UpdateNumCopyRequestsForSubtree(bool add); void UpdateNumInputHandlersForSubtree(bool add); @@ -709,6 +704,7 @@ class CC_EXPORT Layer : public base::RefCounted, int transform_tree_index_; int opacity_tree_index_; int clip_tree_index_; + int property_tree_sequence_number_; int num_layer_or_descendants_with_copy_request_; int num_layer_or_descendants_with_input_handler_; gfx::Vector2dF offset_to_transform_parent_; diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc index c4e59d87f4cfe..8b3467a91282b 100644 --- a/cc/layers/layer_impl.cc +++ b/cc/layers/layer_impl.cc @@ -208,6 +208,21 @@ void LayerImpl::SetClipChildren(std::set* children) { SetNeedsPushProperties(); } +void LayerImpl::SetTransformTreeIndex(int index) { + transform_tree_index_ = index; + SetNeedsPushProperties(); +} + +void LayerImpl::SetClipTreeIndex(int index) { + clip_tree_index_ = index; + SetNeedsPushProperties(); +} + +void LayerImpl::SetOpacityTreeIndex(int index) { + opacity_tree_index_ = index; + SetNeedsPushProperties(); +} + void LayerImpl::PassCopyRequests(ScopedPtrVector* requests) { if (requests->empty()) return; @@ -552,9 +567,9 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) { layer->Set3dSortingContextId(sorting_context_id_); layer->SetNumDescendantsThatDrawContent(num_descendants_that_draw_content_); - layer->set_transform_tree_index(transform_tree_index_); - layer->set_opacity_tree_index(opacity_tree_index_); - layer->set_clip_tree_index(clip_tree_index_); + layer->SetTransformTreeIndex(transform_tree_index_); + layer->SetClipTreeIndex(clip_tree_index_); + layer->SetOpacityTreeIndex(opacity_tree_index_); layer->set_offset_to_transform_parent(offset_to_transform_parent_); LayerImpl* scroll_parent = nullptr; diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h index 87ab60b101f3d..08db87f1392ae 100644 --- a/cc/layers/layer_impl.h +++ b/cc/layers/layer_impl.h @@ -32,7 +32,7 @@ #include "cc/output/filter_operations.h" #include "cc/quads/shared_quad_state.h" #include "cc/resources/resource_provider.h" -#include "cc/resources/tile_priority.h" +#include "cc/tiles/tile_priority.h" #include "skia/ext/refptr.h" #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkImageFilter.h" @@ -151,20 +151,15 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver, return scroll_children_.get(); } - void set_transform_tree_index(int index) { - transform_tree_index_ = index; - SetNeedsPushProperties(); - } - void set_clip_tree_index(int index) { - clip_tree_index_ = index; - SetNeedsPushProperties(); - } - void set_opacity_tree_index(int index) { - opacity_tree_index_ = index; - SetNeedsPushProperties(); - } - int clip_tree_index() const { return clip_tree_index_; } + void set_property_tree_sequence_number(int sequence_number) {} + + void SetTransformTreeIndex(int index); int transform_tree_index() const { return transform_tree_index_; } + + void SetClipTreeIndex(int index); + int clip_tree_index() const { return clip_tree_index_; } + + void SetOpacityTreeIndex(int index); int opacity_tree_index() const { return opacity_tree_index_; } void set_offset_to_transform_parent(const gfx::Vector2dF& offset) { diff --git a/cc/layers/picture_image_layer.cc b/cc/layers/picture_image_layer.cc index 71bdb44e9ea08..345ee2b4e95fd 100644 --- a/cc/layers/picture_image_layer.cc +++ b/cc/layers/picture_image_layer.cc @@ -5,7 +5,7 @@ #include "cc/layers/picture_image_layer.h" #include "cc/layers/picture_image_layer_impl.h" -#include "cc/resources/drawing_display_item.h" +#include "cc/playback/drawing_display_item.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkPictureRecorder.h" #include "ui/gfx/skia_util.h" diff --git a/cc/layers/picture_image_layer_impl_unittest.cc b/cc/layers/picture_image_layer_impl_unittest.cc index 5814bb4fcb94a..fa4cb6e7e06cd 100644 --- a/cc/layers/picture_image_layer_impl_unittest.cc +++ b/cc/layers/picture_image_layer_impl_unittest.cc @@ -7,7 +7,6 @@ #include "base/thread_task_runner_handle.h" #include "cc/layers/append_quads_data.h" #include "cc/quads/draw_quad.h" -#include "cc/resources/tile_priority.h" #include "cc/test/fake_impl_proxy.h" #include "cc/test/fake_layer_tree_host_impl.h" #include "cc/test/fake_output_surface.h" @@ -15,6 +14,7 @@ #include "cc/test/impl_side_painting_settings.h" #include "cc/test/test_shared_bitmap_manager.h" #include "cc/test/test_task_graph_runner.h" +#include "cc/tiles/tile_priority.h" #include "cc/trees/layer_tree_impl.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/cc/layers/picture_image_layer_unittest.cc b/cc/layers/picture_image_layer_unittest.cc index 0ed39c216b286..786e30979a375 100644 --- a/cc/layers/picture_image_layer_unittest.cc +++ b/cc/layers/picture_image_layer_unittest.cc @@ -4,7 +4,7 @@ #include "cc/layers/picture_image_layer.h" -#include "cc/resources/display_item.h" +#include "cc/playback/display_item.h" #include "cc/test/skia_common.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/skia/include/core/SkBitmap.h" diff --git a/cc/layers/picture_layer.cc b/cc/layers/picture_layer.cc index 06fff4642d3ed..999363282a059 100644 --- a/cc/layers/picture_layer.cc +++ b/cc/layers/picture_layer.cc @@ -7,8 +7,8 @@ #include "base/auto_reset.h" #include "cc/layers/content_layer_client.h" #include "cc/layers/picture_layer_impl.h" -#include "cc/resources/display_list_recording_source.h" -#include "cc/resources/picture_pile.h" +#include "cc/playback/display_list_recording_source.h" +#include "cc/playback/picture_pile.h" #include "cc/trees/layer_tree_host.h" #include "cc/trees/layer_tree_impl.h" #include "third_party/skia/include/core/SkPictureRecorder.h" diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc index cb41e7a2031c3..f9f6d9787145d 100644 --- a/cc/layers/picture_layer_impl.cc +++ b/cc/layers/picture_layer_impl.cc @@ -24,8 +24,8 @@ #include "cc/quads/picture_draw_quad.h" #include "cc/quads/solid_color_draw_quad.h" #include "cc/quads/tile_draw_quad.h" -#include "cc/resources/tile_manager.h" -#include "cc/resources/tiling_set_raster_queue_all.h" +#include "cc/tiles/tile_manager.h" +#include "cc/tiles/tiling_set_raster_queue_all.h" #include "cc/trees/layer_tree_impl.h" #include "cc/trees/occlusion.h" #include "ui/gfx/geometry/quad_f.h" @@ -1147,7 +1147,7 @@ scoped_ptr PictureLayerImpl::CreatePictureLayerTilingSet() { const LayerTreeSettings& settings = layer_tree_impl()->settings(); return PictureLayerTilingSet::Create( - GetTree(), this, settings.tiling_interest_area_viewport_multiplier, + GetTree(), this, settings.max_tiles_for_interest_area, layer_tree_impl()->use_gpu_rasterization() ? settings.gpu_rasterization_skewport_target_time_in_seconds : settings.skewport_target_time_in_seconds, diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h index f186f82f87431..bca8224974ce4 100644 --- a/cc/layers/picture_layer_impl.h +++ b/cc/layers/picture_layer_impl.h @@ -12,10 +12,10 @@ #include "cc/base/cc_export.h" #include "cc/base/scoped_ptr_vector.h" #include "cc/layers/layer_impl.h" -#include "cc/resources/picture_layer_tiling.h" -#include "cc/resources/picture_layer_tiling_set.h" -#include "cc/resources/picture_pile_impl.h" -#include "cc/resources/tiling_set_eviction_queue.h" +#include "cc/playback/picture_pile_impl.h" +#include "cc/tiles/picture_layer_tiling.h" +#include "cc/tiles/picture_layer_tiling_set.h" +#include "cc/tiles/tiling_set_eviction_queue.h" #include "skia/ext/refptr.h" #include "third_party/skia/include/core/SkPicture.h" diff --git a/cc/layers/picture_layer_impl_perftest.cc b/cc/layers/picture_layer_impl_perftest.cc index c5f6692520521..adb05976f7236 100644 --- a/cc/layers/picture_layer_impl_perftest.cc +++ b/cc/layers/picture_layer_impl_perftest.cc @@ -6,7 +6,6 @@ #include "base/thread_task_runner_handle.h" #include "cc/debug/lap_timer.h" -#include "cc/resources/tiling_set_raster_queue_all.h" #include "cc/test/fake_impl_proxy.h" #include "cc/test/fake_layer_tree_host_impl.h" #include "cc/test/fake_output_surface.h" @@ -15,6 +14,7 @@ #include "cc/test/impl_side_painting_settings.h" #include "cc/test/test_shared_bitmap_manager.h" #include "cc/test/test_task_graph_runner.h" +#include "cc/tiles/tiling_set_raster_queue_all.h" #include "cc/trees/layer_tree_impl.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/perf/perf_test.h" @@ -41,7 +41,7 @@ class PictureLayerImplPerfTest : public testing::Test { public: PictureLayerImplPerfTest() : proxy_(base::ThreadTaskRunnerHandle::Get()), - host_impl_(ImplSidePaintingSettings(10000), + host_impl_(ImplSidePaintingSettings(), &proxy_, &shared_bitmap_manager_, &task_graph_runner_), diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc index fb056aa741a07..cc89133b781d5 100644 --- a/cc/layers/picture_layer_impl_unittest.cc +++ b/cc/layers/picture_layer_impl_unittest.cc @@ -16,8 +16,6 @@ #include "cc/layers/picture_layer.h" #include "cc/quads/draw_quad.h" #include "cc/quads/tile_draw_quad.h" -#include "cc/resources/tiling_set_raster_queue_all.h" -#include "cc/resources/tiling_set_raster_queue_required.h" #include "cc/test/begin_frame_args_test.h" #include "cc/test/fake_content_layer_client.h" #include "cc/test/fake_impl_proxy.h" @@ -31,6 +29,8 @@ #include "cc/test/test_shared_bitmap_manager.h" #include "cc/test/test_task_graph_runner.h" #include "cc/test/test_web_graphics_context_3d.h" +#include "cc/tiles/tiling_set_raster_queue_all.h" +#include "cc/tiles/tiling_set_raster_queue_required.h" #include "cc/trees/layer_tree_impl.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/geometry/rect_conversions.h" @@ -2558,8 +2558,8 @@ TEST_F(PictureLayerImplTest, RequiredTilesWithGpuRasterization) { active_layer_->HighResTiling()->UpdateAllRequiredStateForTesting(); - // High res tiling should have 36 tiles (3X12 tile grid). - EXPECT_EQ(36u, active_layer_->HighResTiling()->AllTilesForTesting().size()); + // High res tiling should have 64 tiles (4x16 tile grid). + EXPECT_EQ(64u, active_layer_->HighResTiling()->AllTilesForTesting().size()); // Visible viewport should be covered by 4 tiles. No other // tiles should be required for activation. diff --git a/cc/layers/tiled_layer.h b/cc/layers/tiled_layer.h index d48ebe4408237..80697607ee623 100644 --- a/cc/layers/tiled_layer.h +++ b/cc/layers/tiled_layer.h @@ -7,8 +7,8 @@ #include "cc/base/cc_export.h" #include "cc/layers/contents_scaling_layer.h" -#include "cc/resources/layer_tiling_data.h" #include "cc/resources/resource_format.h" +#include "cc/tiles/layer_tiling_data.h" namespace cc { class LayerUpdater; diff --git a/cc/layers/tiled_layer_impl.cc b/cc/layers/tiled_layer_impl.cc index 85b1115595de3..66aee5282c6be 100644 --- a/cc/layers/tiled_layer_impl.cc +++ b/cc/layers/tiled_layer_impl.cc @@ -15,7 +15,7 @@ #include "cc/quads/debug_border_draw_quad.h" #include "cc/quads/solid_color_draw_quad.h" #include "cc/quads/tile_draw_quad.h" -#include "cc/resources/layer_tiling_data.h" +#include "cc/tiles/layer_tiling_data.h" #include "cc/trees/layer_tree_impl.h" #include "cc/trees/occlusion.h" #include "third_party/skia/include/core/SkColor.h" diff --git a/cc/layers/tiled_layer_impl_unittest.cc b/cc/layers/tiled_layer_impl_unittest.cc index f3f772159a407..6e662568bcd14 100644 --- a/cc/layers/tiled_layer_impl_unittest.cc +++ b/cc/layers/tiled_layer_impl_unittest.cc @@ -6,12 +6,12 @@ #include "cc/layers/append_quads_data.h" #include "cc/quads/tile_draw_quad.h" -#include "cc/resources/layer_tiling_data.h" #include "cc/test/fake_impl_proxy.h" #include "cc/test/fake_layer_tree_host_impl.h" #include "cc/test/fake_output_surface.h" #include "cc/test/layer_test_common.h" #include "cc/test/test_task_graph_runner.h" +#include "cc/tiles/layer_tiling_data.h" #include "cc/trees/single_thread_proxy.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/cc/layers/video_frame_provider.h b/cc/layers/video_frame_provider.h index ff632f6546dea..f747a88315d39 100644 --- a/cc/layers/video_frame_provider.h +++ b/cc/layers/video_frame_provider.h @@ -67,6 +67,10 @@ class CC_EXPORT VideoFrameProvider { virtual bool UpdateCurrentFrame(base::TimeTicks deadline_min, base::TimeTicks deadline_max) = 0; + // Returns true if GetCurrentFrame() will return a non-null frame and false + // otherwise. Aside from thread locks, the state won't change. + virtual bool HasCurrentFrame() = 0; + // Returns the current frame, which may have been updated by a recent call to // UpdateCurrentFrame(). A call to this method does not ensure that the frame // will be rendered. A subsequent call to PutCurrentFrame() must be made if @@ -79,8 +83,11 @@ class CC_EXPORT VideoFrameProvider { // has been removed. http://crbug.com/439548 virtual scoped_refptr GetCurrentFrame() = 0; - // Indicates that the last frame returned via GetCurrentFrame() is expected to - // be rendered. Must only occur after a previous call to GetCurrentFrame(). + // Called in response to DidReceiveFrame() or a return value of true from + // UpdateCurrentFrame() if the current frame was considered for rendering; the + // frame may not been rendered for a variety of reasons (occlusion, etc). + // Providers may use the absence of this call as a signal to detect when a new + // frame missed its intended deadline. virtual void PutCurrentFrame() = 0; protected: diff --git a/cc/layers/video_frame_provider_client_impl.cc b/cc/layers/video_frame_provider_client_impl.cc index 5fab4e2f04c4d..f2c5eb2627a91 100644 --- a/cc/layers/video_frame_provider_client_impl.cc +++ b/cc/layers/video_frame_provider_client_impl.cc @@ -25,7 +25,8 @@ VideoFrameProviderClientImpl::VideoFrameProviderClientImpl( client_(client), active_video_layer_(nullptr), stopped_(false), - rendering_(false) { + rendering_(false), + needs_put_current_frame_(false) { // This only happens during a commit on the compositor thread while the main // thread is blocked. That makes this a thread-safe call to set the video // frame provider client that does not require a lock. The same is true of @@ -90,6 +91,7 @@ void VideoFrameProviderClientImpl::PutCurrentFrame() { DCHECK(thread_checker_.CalledOnValidThread()); provider_lock_.AssertAcquired(); provider_->PutCurrentFrame(); + needs_put_current_frame_ = false; } void VideoFrameProviderClientImpl::ReleaseLock() { @@ -98,6 +100,11 @@ void VideoFrameProviderClientImpl::ReleaseLock() { provider_lock_.Release(); } +bool VideoFrameProviderClientImpl::HasCurrentFrame() { + base::AutoLock locker(provider_lock_); + return provider_ && provider_->HasCurrentFrame(); +} + const gfx::Transform& VideoFrameProviderClientImpl::StreamTextureMatrix() const { DCHECK(thread_checker_.CalledOnValidThread()); @@ -105,10 +112,12 @@ const gfx::Transform& VideoFrameProviderClientImpl::StreamTextureMatrix() } void VideoFrameProviderClientImpl::StopUsingProvider() { - // Block the provider from shutting down until this client is done - // using the frame. - base::AutoLock locker(provider_lock_); - provider_ = nullptr; + { + // Block the provider from shutting down until this client is done + // using the frame. + base::AutoLock locker(provider_lock_); + provider_ = nullptr; + } if (rendering_) StopRendering(); } @@ -137,6 +146,7 @@ void VideoFrameProviderClientImpl::DidReceiveFrame() { "active_video_layer", !!active_video_layer_); DCHECK(thread_checker_.CalledOnValidThread()); + needs_put_current_frame_ = true; if (active_video_layer_) active_video_layer_->SetNeedsRedraw(); } @@ -158,17 +168,31 @@ void VideoFrameProviderClientImpl::OnBeginFrame(const BeginFrameArgs& args) { DCHECK(!stopped_); TRACE_EVENT0("cc", "VideoFrameProviderClientImpl::OnBeginFrame"); - base::AutoLock locker(provider_lock_); - - // We use frame_time + interval here because that is the estimated time at - // which a frame returned during this phase will end up being displayed. - if (!provider_ || - !provider_->UpdateCurrentFrame(args.frame_time + args.interval, - args.frame_time + 2 * args.interval)) { - return; + { + base::AutoLock locker(provider_lock_); + + // We use frame_time + interval here because that is the estimated time at + // which a frame returned during this phase will end up being displayed. + if (!provider_ || + !provider_->UpdateCurrentFrame(args.frame_time + args.interval, + args.frame_time + 2 * args.interval)) { + return; + } } + // Warning: Do not hold |provider_lock_| while calling this function, it may + // lead to a reentrant call to HasCurrentFrame() above. DidReceiveFrame(); } +void VideoFrameProviderClientImpl::DidDrawFrame() { + DCHECK(thread_checker_.CalledOnValidThread()); + { + base::AutoLock locker(provider_lock_); + if (provider_ && needs_put_current_frame_) + provider_->PutCurrentFrame(); + } + needs_put_current_frame_ = false; +} + } // namespace cc diff --git a/cc/layers/video_frame_provider_client_impl.h b/cc/layers/video_frame_provider_client_impl.h index be49e15e40e9b..5429228b49ba7 100644 --- a/cc/layers/video_frame_provider_client_impl.h +++ b/cc/layers/video_frame_provider_client_impl.h @@ -42,11 +42,13 @@ class CC_EXPORT VideoFrameProviderClientImpl scoped_refptr AcquireLockAndCurrentFrame(); void PutCurrentFrame(); void ReleaseLock(); + bool HasCurrentFrame(); const gfx::Transform& StreamTextureMatrix() const; // VideoFrameController implementation. void OnBeginFrame(const BeginFrameArgs& args) override; + void DidDrawFrame() override; // VideoFrameProvider::Client implementation. // Called on the main thread. @@ -69,6 +71,7 @@ class CC_EXPORT VideoFrameProviderClientImpl VideoLayerImpl* active_video_layer_; bool stopped_; bool rendering_; + bool needs_put_current_frame_; // Since the provider lives on another thread, it can be destroyed while the // frame controller are accessing its frame. Before being destroyed the diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc index d81713a5dec77..d73786d9bf470 100644 --- a/cc/layers/video_layer_impl.cc +++ b/cc/layers/video_layer_impl.cc @@ -388,6 +388,13 @@ void VideoLayerImpl::DidDraw(ResourceProvider* resource_provider) { provider_client_impl_->ReleaseLock(); } +SimpleEnclosedRegion VideoLayerImpl::VisibleContentOpaqueRegion() const { + // If we don't have a frame yet, then we don't have an opaque region. + if (!provider_client_impl_->HasCurrentFrame()) + return SimpleEnclosedRegion(); + return LayerImpl::VisibleContentOpaqueRegion(); +} + void VideoLayerImpl::ReleaseResources() { updater_ = nullptr; } diff --git a/cc/layers/video_layer_impl.h b/cc/layers/video_layer_impl.h index 0a617985b4d8f..aea38b5cbbe69 100644 --- a/cc/layers/video_layer_impl.h +++ b/cc/layers/video_layer_impl.h @@ -38,6 +38,7 @@ class CC_EXPORT VideoLayerImpl : public LayerImpl { void AppendQuads(RenderPass* render_pass, AppendQuadsData* append_quads_data) override; void DidDraw(ResourceProvider* resource_provider) override; + SimpleEnclosedRegion VisibleContentOpaqueRegion() const override; void DidBecomeActive() override; void ReleaseResources() override; diff --git a/cc/layers/video_layer_impl_unittest.cc b/cc/layers/video_layer_impl_unittest.cc index 40ab5b7dbe4b1..b0ecff95d3943 100644 --- a/cc/layers/video_layer_impl_unittest.cc +++ b/cc/layers/video_layer_impl_unittest.cc @@ -85,6 +85,50 @@ TEST(VideoLayerImplTest, Occlusion) { } } +TEST(VideoLayerImplTest, OccludesOtherLayers) { + gfx::Size layer_size(1000, 1000); + gfx::Rect visible(layer_size); + + LayerTestCommon::LayerImplTest impl; + impl.host_impl()->SetViewportSize(layer_size); + DebugSetImplThreadAndMainThreadBlocked(impl.proxy()); + auto active_tree = impl.host_impl()->active_tree(); + + // Create a video layer with no frame on top of another layer. + scoped_ptr layer_impl = LayerImpl::Create(active_tree, 3); + layer_impl->SetHasRenderSurface(true); + layer_impl->SetBounds(layer_size); + layer_impl->SetContentBounds(layer_size); + layer_impl->SetDrawsContent(true); + const auto& draw_properties = layer_impl->draw_properties(); + + FakeVideoFrameProvider provider; + scoped_ptr video_layer_impl = VideoLayerImpl::Create( + active_tree, 4, &provider, media::VIDEO_ROTATION_0); + video_layer_impl->SetBounds(layer_size); + video_layer_impl->SetContentBounds(layer_size); + video_layer_impl->SetDrawsContent(true); + video_layer_impl->SetContentsOpaque(true); + + layer_impl->AddChild(video_layer_impl.Pass()); + active_tree->SetRootLayer(layer_impl.Pass()); + + active_tree->UpdateDrawProperties(false); + + // We don't have a frame yet, so the video doesn't occlude the layer below it. + EXPECT_FALSE(draw_properties.occlusion_in_content_space.IsOccluded(visible)); + + scoped_refptr video_frame = media::VideoFrame::CreateFrame( + media::VideoFrame::YV12, gfx::Size(10, 10), gfx::Rect(10, 10), + gfx::Size(10, 10), base::TimeDelta()); + provider.set_frame(video_frame); + active_tree->set_needs_update_draw_properties(); + active_tree->UpdateDrawProperties(false); + + // We have a frame now, so the video occludes the layer below it. + EXPECT_TRUE(draw_properties.occlusion_in_content_space.IsOccluded(visible)); +} + TEST(VideoLayerImplTest, DidBecomeActiveShouldSetActiveVideoLayer) { LayerTestCommon::LayerImplTest impl; DebugSetImplThreadAndMainThreadBlocked(impl.proxy()); diff --git a/cc/output/direct_renderer.h b/cc/output/direct_renderer.h index 34dccd5828cb2..a4f184a30e6c1 100644 --- a/cc/output/direct_renderer.h +++ b/cc/output/direct_renderer.h @@ -12,9 +12,9 @@ #include "cc/base/scoped_ptr_deque.h" #include "cc/output/overlay_processor.h" #include "cc/output/renderer.h" +#include "cc/raster/task_graph_runner.h" #include "cc/resources/resource_provider.h" #include "cc/resources/scoped_resource.h" -#include "cc/resources/task_graph_runner.h" #include "ui/gfx/geometry/quad_f.h" namespace cc { diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc index 93a4114e2b204..69da9a747542d 100644 --- a/cc/output/gl_renderer.cc +++ b/cc/output/gl_renderer.cc @@ -24,18 +24,18 @@ #include "cc/output/copy_output_request.h" #include "cc/output/dynamic_geometry_binding.h" #include "cc/output/gl_frame_data.h" +#include "cc/output/layer_quad.h" #include "cc/output/output_surface.h" #include "cc/output/render_surface_filters.h" #include "cc/output/static_geometry_binding.h" +#include "cc/output/texture_mailbox_deleter.h" #include "cc/quads/draw_polygon.h" #include "cc/quads/picture_draw_quad.h" #include "cc/quads/render_pass.h" #include "cc/quads/stream_video_draw_quad.h" #include "cc/quads/texture_draw_quad.h" -#include "cc/resources/layer_quad.h" -#include "cc/resources/scoped_gpu_raster.h" +#include "cc/raster/scoped_gpu_raster.h" #include "cc/resources/scoped_resource.h" -#include "cc/resources/texture_mailbox_deleter.h" #include "gpu/GLES2/gl2extchromium.h" #include "gpu/command_buffer/client/context_support.h" #include "gpu/command_buffer/client/gles2_interface.h" diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc index 8fe1e807274a7..09407f55ed781 100644 --- a/cc/output/gl_renderer_unittest.cc +++ b/cc/output/gl_renderer_unittest.cc @@ -14,9 +14,9 @@ #include "cc/output/copy_output_request.h" #include "cc/output/copy_output_result.h" #include "cc/output/overlay_strategy_single_on_top.h" +#include "cc/output/texture_mailbox_deleter.h" #include "cc/quads/texture_draw_quad.h" #include "cc/resources/resource_provider.h" -#include "cc/resources/texture_mailbox_deleter.h" #include "cc/test/fake_impl_proxy.h" #include "cc/test/fake_layer_tree_host_impl.h" #include "cc/test/fake_output_surface.h" diff --git a/cc/resources/layer_quad.cc b/cc/output/layer_quad.cc similarity index 98% rename from cc/resources/layer_quad.cc rename to cc/output/layer_quad.cc index ff336ba98b2cd..537c87bd61dfc 100644 --- a/cc/resources/layer_quad.cc +++ b/cc/output/layer_quad.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/layer_quad.h" +#include "cc/output/layer_quad.h" #include "base/logging.h" #include "ui/gfx/geometry/quad_f.h" diff --git a/cc/resources/layer_quad.h b/cc/output/layer_quad.h similarity index 95% rename from cc/resources/layer_quad.h rename to cc/output/layer_quad.h index 328f666848236..9ed3ff567bc3d 100644 --- a/cc/resources/layer_quad.h +++ b/cc/output/layer_quad.h @@ -3,8 +3,8 @@ // found in the LICENSE file. -#ifndef CC_RESOURCES_LAYER_QUAD_H_ -#define CC_RESOURCES_LAYER_QUAD_H_ +#ifndef CC_OUTPUT_LAYER_QUAD_H_ +#define CC_OUTPUT_LAYER_QUAD_H_ #include "base/basictypes.h" #include "cc/base/cc_export.h" @@ -110,4 +110,4 @@ class CC_EXPORT LayerQuad { } // namespace cc -#endif // CC_RESOURCES_LAYER_QUAD_H_ +#endif // CC_OUTPUT_LAYER_QUAD_H_ diff --git a/cc/resources/layer_quad_unittest.cc b/cc/output/layer_quad_unittest.cc similarity index 98% rename from cc/resources/layer_quad_unittest.cc rename to cc/output/layer_quad_unittest.cc index 90f61bedd78f3..e910705a0f6f8 100644 --- a/cc/resources/layer_quad_unittest.cc +++ b/cc/output/layer_quad_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/layer_quad.h" +#include "cc/output/layer_quad.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/geometry/quad_f.h" diff --git a/cc/output/managed_memory_policy.h b/cc/output/managed_memory_policy.h index ad0224b6c42ca..a7273822a783c 100644 --- a/cc/output/managed_memory_policy.h +++ b/cc/output/managed_memory_policy.h @@ -7,7 +7,7 @@ #include "base/basictypes.h" #include "cc/base/cc_export.h" -#include "cc/resources/tile_priority.h" +#include "cc/tiles/tile_priority.h" #include "gpu/command_buffer/common/gpu_memory_allocation.h" namespace cc { diff --git a/cc/resources/texture_mailbox_deleter.cc b/cc/output/texture_mailbox_deleter.cc similarity index 98% rename from cc/resources/texture_mailbox_deleter.cc rename to cc/output/texture_mailbox_deleter.cc index ab863684e81fd..aaf2a0ef22344 100644 --- a/cc/resources/texture_mailbox_deleter.cc +++ b/cc/output/texture_mailbox_deleter.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/texture_mailbox_deleter.h" +#include "cc/output/texture_mailbox_deleter.h" #include "base/bind.h" #include "base/location.h" diff --git a/cc/resources/texture_mailbox_deleter.h b/cc/output/texture_mailbox_deleter.h similarity index 92% rename from cc/resources/texture_mailbox_deleter.h rename to cc/output/texture_mailbox_deleter.h index ca0bc0032ca4c..286512626d42a 100644 --- a/cc/resources/texture_mailbox_deleter.h +++ b/cc/output/texture_mailbox_deleter.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TEXTURE_MAILBOX_DELETER_H_ -#define CC_RESOURCES_TEXTURE_MAILBOX_DELETER_H_ +#ifndef CC_OUTPUT_TEXTURE_MAILBOX_DELETER_H_ +#define CC_OUTPUT_TEXTURE_MAILBOX_DELETER_H_ #include "base/memory/weak_ptr.h" #include "cc/base/cc_export.h" @@ -48,4 +48,4 @@ class CC_EXPORT TextureMailboxDeleter { } // namespace cc -#endif // CC_RESOURCES_TEXTURE_MAILBOX_DELETER_H_ +#endif // CC_OUTPUT_TEXTURE_MAILBOX_DELETER_H_ diff --git a/cc/resources/texture_mailbox_deleter_unittest.cc b/cc/output/texture_mailbox_deleter_unittest.cc similarity index 96% rename from cc/resources/texture_mailbox_deleter_unittest.cc rename to cc/output/texture_mailbox_deleter_unittest.cc index 15b425071327a..34d8595aa2088 100644 --- a/cc/resources/texture_mailbox_deleter_unittest.cc +++ b/cc/output/texture_mailbox_deleter_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/texture_mailbox_deleter.h" +#include "cc/output/texture_mailbox_deleter.h" #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" diff --git a/cc/resources/clip_display_item.cc b/cc/playback/clip_display_item.cc similarity index 98% rename from cc/resources/clip_display_item.cc rename to cc/playback/clip_display_item.cc index a16a05d3517cd..a29787409c347 100644 --- a/cc/resources/clip_display_item.cc +++ b/cc/playback/clip_display_item.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/clip_display_item.h" +#include "cc/playback/clip_display_item.h" #include diff --git a/cc/resources/clip_display_item.h b/cc/playback/clip_display_item.h similarity index 87% rename from cc/resources/clip_display_item.h rename to cc/playback/clip_display_item.h index a94e29f002339..a4acc9f9893b5 100644 --- a/cc/resources/clip_display_item.h +++ b/cc/playback/clip_display_item.h @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_CLIP_DISPLAY_ITEM_H_ -#define CC_RESOURCES_CLIP_DISPLAY_ITEM_H_ +#ifndef CC_PLAYBACK_CLIP_DISPLAY_ITEM_H_ +#define CC_PLAYBACK_CLIP_DISPLAY_ITEM_H_ #include #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" -#include "cc/resources/display_item.h" +#include "cc/playback/display_item.h" #include "third_party/skia/include/core/SkRRect.h" #include "ui/gfx/geometry/rect.h" @@ -45,4 +45,4 @@ class CC_EXPORT EndClipDisplayItem : public DisplayItem { } // namespace cc -#endif // CC_RESOURCES_CLIP_DISPLAY_ITEM_H_ +#endif // CC_PLAYBACK_CLIP_DISPLAY_ITEM_H_ diff --git a/cc/resources/clip_path_display_item.cc b/cc/playback/clip_path_display_item.cc similarity index 97% rename from cc/resources/clip_path_display_item.cc rename to cc/playback/clip_path_display_item.cc index b65eb3cda321c..7be8922fca7ad 100644 --- a/cc/resources/clip_path_display_item.cc +++ b/cc/playback/clip_path_display_item.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/clip_path_display_item.h" +#include "cc/playback/clip_path_display_item.h" #include "base/strings/stringprintf.h" #include "base/trace_event/trace_event_argument.h" diff --git a/cc/resources/clip_path_display_item.h b/cc/playback/clip_path_display_item.h similarity index 87% rename from cc/resources/clip_path_display_item.h rename to cc/playback/clip_path_display_item.h index 9f6842c6759c9..19d4a7ced3942 100644 --- a/cc/resources/clip_path_display_item.h +++ b/cc/playback/clip_path_display_item.h @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_CLIP_PATH_DISPLAY_ITEM_H_ -#define CC_RESOURCES_CLIP_PATH_DISPLAY_ITEM_H_ +#ifndef CC_PLAYBACK_CLIP_PATH_DISPLAY_ITEM_H_ +#define CC_PLAYBACK_CLIP_PATH_DISPLAY_ITEM_H_ #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" -#include "cc/resources/display_item.h" +#include "cc/playback/display_item.h" #include "third_party/skia/include/core/SkPath.h" #include "third_party/skia/include/core/SkRegion.h" @@ -47,4 +47,4 @@ class CC_EXPORT EndClipPathDisplayItem : public DisplayItem { } // namespace cc -#endif // CC_RESOURCES_CLIP_PATH_DISPLAY_ITEM_H_ +#endif // CC_PLAYBACK_CLIP_PATH_DISPLAY_ITEM_H_ diff --git a/cc/resources/compositing_display_item.cc b/cc/playback/compositing_display_item.cc similarity index 98% rename from cc/resources/compositing_display_item.cc rename to cc/playback/compositing_display_item.cc index ac476fa39e9c8..bee1fb15dcb67 100644 --- a/cc/resources/compositing_display_item.cc +++ b/cc/playback/compositing_display_item.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/compositing_display_item.h" +#include "cc/playback/compositing_display_item.h" #include "base/strings/stringprintf.h" #include "base/trace_event/trace_event_argument.h" diff --git a/cc/resources/compositing_display_item.h b/cc/playback/compositing_display_item.h similarity index 89% rename from cc/resources/compositing_display_item.h rename to cc/playback/compositing_display_item.h index 5051cd26d6e07..d2af8d5ceb756 100644 --- a/cc/resources/compositing_display_item.h +++ b/cc/playback/compositing_display_item.h @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_COMPOSITING_DISPLAY_ITEM_H_ -#define CC_RESOURCES_COMPOSITING_DISPLAY_ITEM_H_ +#ifndef CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ +#define CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" -#include "cc/resources/display_item.h" +#include "cc/playback/display_item.h" #include "skia/ext/refptr.h" #include "third_party/skia/include/core/SkColorFilter.h" #include "third_party/skia/include/core/SkRect.h" @@ -55,4 +55,4 @@ class CC_EXPORT EndCompositingDisplayItem : public DisplayItem { } // namespace cc -#endif // CC_RESOURCES_COMPOSITING_DISPLAY_ITEM_H_ +#endif // CC_PLAYBACK_COMPOSITING_DISPLAY_ITEM_H_ diff --git a/cc/resources/display_item.cc b/cc/playback/display_item.cc similarity index 85% rename from cc/resources/display_item.cc rename to cc/playback/display_item.cc index 33069a53fdf27..cbfee030477a6 100644 --- a/cc/resources/display_item.cc +++ b/cc/playback/display_item.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/display_item.h" +#include "cc/playback/display_item.h" namespace cc { diff --git a/cc/resources/display_item.h b/cc/playback/display_item.h similarity index 92% rename from cc/resources/display_item.h rename to cc/playback/display_item.h index 6716e65a39fa9..2eedb91b5f353 100644 --- a/cc/resources/display_item.h +++ b/cc/playback/display_item.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_DISPLAY_ITEM_H_ -#define CC_RESOURCES_DISPLAY_ITEM_H_ +#ifndef CC_PLAYBACK_DISPLAY_ITEM_H_ +#define CC_PLAYBACK_DISPLAY_ITEM_H_ #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" @@ -48,4 +48,4 @@ class CC_EXPORT DisplayItem { } // namespace cc -#endif // CC_RESOURCES_DISPLAY_ITEM_H_ +#endif // CC_PLAYBACK_DISPLAY_ITEM_H_ diff --git a/cc/resources/display_item_list.cc b/cc/playback/display_item_list.cc similarity index 98% rename from cc/resources/display_item_list.cc rename to cc/playback/display_item_list.cc index 18e971a862847..656ade1deff93 100644 --- a/cc/resources/display_item_list.cc +++ b/cc/playback/display_item_list.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/display_item_list.h" +#include "cc/playback/display_item_list.h" #include @@ -12,7 +12,7 @@ #include "cc/debug/picture_debug_util.h" #include "cc/debug/traced_picture.h" #include "cc/debug/traced_value.h" -#include "cc/resources/largest_display_item.h" +#include "cc/playback/largest_display_item.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkDrawPictureCallback.h" #include "third_party/skia/include/core/SkPictureRecorder.h" diff --git a/cc/resources/display_item_list.h b/cc/playback/display_item_list.h similarity index 93% rename from cc/resources/display_item_list.h rename to cc/playback/display_item_list.h index 9bd157f33274e..84b4168372019 100644 --- a/cc/resources/display_item_list.h +++ b/cc/playback/display_item_list.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_DISPLAY_ITEM_LIST_H_ -#define CC_RESOURCES_DISPLAY_ITEM_LIST_H_ +#ifndef CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ +#define CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ #include "base/gtest_prod_util.h" #include "base/memory/ref_counted.h" @@ -11,10 +11,10 @@ #include "base/trace_event/trace_event.h" #include "cc/base/cc_export.h" #include "cc/base/scoped_ptr_vector.h" +#include "cc/playback/display_item.h" +#include "cc/playback/pixel_ref_map.h" // TODO(danakj): Move ListContainer out of cc/quads/ #include "cc/quads/list_container.h" -#include "cc/resources/display_item.h" -#include "cc/resources/pixel_ref_map.h" #include "skia/ext/refptr.h" #include "third_party/skia/include/core/SkPicture.h" #include "ui/gfx/geometry/rect.h" @@ -97,4 +97,4 @@ class CC_EXPORT DisplayItemList } // namespace cc -#endif // CC_RESOURCES_DISPLAY_ITEM_LIST_H_ +#endif // CC_PLAYBACK_DISPLAY_ITEM_LIST_H_ diff --git a/cc/resources/display_item_list_unittest.cc b/cc/playback/display_item_list_unittest.cc similarity index 98% rename from cc/resources/display_item_list_unittest.cc rename to cc/playback/display_item_list_unittest.cc index 21dfea6fe6edc..6a5bbf61ae834 100644 --- a/cc/resources/display_item_list_unittest.cc +++ b/cc/playback/display_item_list_unittest.cc @@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/display_item_list.h" +#include "cc/playback/display_item_list.h" #include #include "cc/output/filter_operation.h" #include "cc/output/filter_operations.h" -#include "cc/resources/clip_display_item.h" -#include "cc/resources/drawing_display_item.h" -#include "cc/resources/filter_display_item.h" -#include "cc/resources/transform_display_item.h" +#include "cc/playback/clip_display_item.h" +#include "cc/playback/drawing_display_item.h" +#include "cc/playback/filter_display_item.h" +#include "cc/playback/transform_display_item.h" #include "cc/test/skia_common.h" #include "skia/ext/refptr.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/cc/resources/display_list_raster_source.cc b/cc/playback/display_list_raster_source.cc similarity index 98% rename from cc/resources/display_list_raster_source.cc rename to cc/playback/display_list_raster_source.cc index 8a2df82a877f4..0dcd025f3c9c2 100644 --- a/cc/resources/display_list_raster_source.cc +++ b/cc/playback/display_list_raster_source.cc @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/display_list_raster_source.h" +#include "cc/playback/display_list_raster_source.h" #include "base/trace_event/trace_event.h" #include "cc/base/region.h" #include "cc/debug/debug_colors.h" -#include "cc/resources/display_item_list.h" -#include "cc/resources/raster_source_helper.h" +#include "cc/playback/display_item_list.h" +#include "cc/playback/raster_source_helper.h" #include "skia/ext/analysis_canvas.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkPictureRecorder.h" diff --git a/cc/resources/display_list_raster_source.h b/cc/playback/display_list_raster_source.h similarity index 93% rename from cc/resources/display_list_raster_source.h rename to cc/playback/display_list_raster_source.h index 8c2ab91049637..e9010e5926140 100644 --- a/cc/resources/display_list_raster_source.h +++ b/cc/playback/display_list_raster_source.h @@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_DISPLAY_LIST_RASTER_SOURCE_H_ -#define CC_RESOURCES_DISPLAY_LIST_RASTER_SOURCE_H_ +#ifndef CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ +#define CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ #include #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" #include "cc/debug/rendering_stats_instrumentation.h" -#include "cc/resources/display_list_recording_source.h" -#include "cc/resources/raster_source.h" +#include "cc/playback/display_list_recording_source.h" +#include "cc/playback/raster_source.h" #include "skia/ext/analysis_canvas.h" #include "skia/ext/refptr.h" #include "third_party/skia/include/core/SkPicture.h" @@ -95,4 +95,4 @@ class CC_EXPORT DisplayListRasterSource : public RasterSource { } // namespace cc -#endif // CC_RESOURCES_DISPLAY_LIST_RASTER_SOURCE_H_ +#endif // CC_PLAYBACK_DISPLAY_LIST_RASTER_SOURCE_H_ diff --git a/cc/resources/display_list_recording_source.cc b/cc/playback/display_list_recording_source.cc similarity index 97% rename from cc/resources/display_list_recording_source.cc rename to cc/playback/display_list_recording_source.cc index 3fcac114fb857..9d6e31f26c7ef 100644 --- a/cc/resources/display_list_recording_source.cc +++ b/cc/playback/display_list_recording_source.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/display_list_recording_source.h" +#include "cc/playback/display_list_recording_source.h" #include #include "cc/base/region.h" #include "cc/layers/content_layer_client.h" -#include "cc/resources/display_item_list.h" -#include "cc/resources/display_list_raster_source.h" +#include "cc/playback/display_item_list.h" +#include "cc/playback/display_list_raster_source.h" #include "skia/ext/analysis_canvas.h" namespace { diff --git a/cc/resources/display_list_recording_source.h b/cc/playback/display_list_recording_source.h similarity index 91% rename from cc/resources/display_list_recording_source.h rename to cc/playback/display_list_recording_source.h index 2d994f6263f7b..8d652fa67defd 100644 --- a/cc/resources/display_list_recording_source.h +++ b/cc/playback/display_list_recording_source.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_DISPLAY_LIST_RECORDING_SOURCE_H_ -#define CC_RESOURCES_DISPLAY_LIST_RECORDING_SOURCE_H_ +#ifndef CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ +#define CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ #include "base/memory/scoped_ptr.h" -#include "cc/resources/recording_source.h" +#include "cc/playback/recording_source.h" namespace cc { class DisplayItemList; @@ -67,4 +67,4 @@ class CC_EXPORT DisplayListRecordingSource : public RecordingSource { } // namespace cc -#endif // CC_RESOURCES_DISPLAY_LIST_RECORDING_SOURCE_H_ +#endif // CC_PLAYBACK_DISPLAY_LIST_RECORDING_SOURCE_H_ diff --git a/cc/resources/display_list_recording_source_unittest.cc b/cc/playback/display_list_recording_source_unittest.cc similarity index 99% rename from cc/resources/display_list_recording_source_unittest.cc rename to cc/playback/display_list_recording_source_unittest.cc index 9bf7f894d4881..0d7ec7c74f1a5 100644 --- a/cc/resources/display_list_recording_source_unittest.cc +++ b/cc/playback/display_list_recording_source_unittest.cc @@ -4,7 +4,7 @@ #include -#include "cc/resources/display_list_raster_source.h" +#include "cc/playback/display_list_raster_source.h" #include "cc/test/fake_display_list_recording_source.h" #include "cc/test/skia_common.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/cc/resources/drawing_display_item.cc b/cc/playback/drawing_display_item.cc similarity index 97% rename from cc/resources/drawing_display_item.cc rename to cc/playback/drawing_display_item.cc index b1ebac8c2ba92..51cd42edf41d2 100644 --- a/cc/resources/drawing_display_item.cc +++ b/cc/playback/drawing_display_item.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/drawing_display_item.h" +#include "cc/playback/drawing_display_item.h" #include diff --git a/cc/resources/drawing_display_item.h b/cc/playback/drawing_display_item.h similarity index 82% rename from cc/resources/drawing_display_item.h rename to cc/playback/drawing_display_item.h index 79b497b770eb0..81ddbce4f113c 100644 --- a/cc/resources/drawing_display_item.h +++ b/cc/playback/drawing_display_item.h @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_DRAWING_DISPLAY_ITEM_H_ -#define CC_RESOURCES_DRAWING_DISPLAY_ITEM_H_ +#ifndef CC_PLAYBACK_DRAWING_DISPLAY_ITEM_H_ +#define CC_PLAYBACK_DRAWING_DISPLAY_ITEM_H_ #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" -#include "cc/resources/display_item.h" +#include "cc/playback/display_item.h" #include "skia/ext/refptr.h" #include "ui/gfx/geometry/point_f.h" @@ -35,4 +35,4 @@ class CC_EXPORT DrawingDisplayItem : public DisplayItem { } // namespace cc -#endif // CC_RESOURCES_DRAWING_DISPLAY_ITEM_H_ +#endif // CC_PLAYBACK_DRAWING_DISPLAY_ITEM_H_ diff --git a/cc/resources/filter_display_item.cc b/cc/playback/filter_display_item.cc similarity index 98% rename from cc/resources/filter_display_item.cc rename to cc/playback/filter_display_item.cc index fa6f20fe113b9..8e849cf600904 100644 --- a/cc/resources/filter_display_item.cc +++ b/cc/playback/filter_display_item.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/filter_display_item.h" +#include "cc/playback/filter_display_item.h" #include "base/strings/stringprintf.h" #include "base/trace_event/trace_event_argument.h" diff --git a/cc/resources/filter_display_item.h b/cc/playback/filter_display_item.h similarity index 87% rename from cc/resources/filter_display_item.h rename to cc/playback/filter_display_item.h index 8ee783f800e4a..a999b3883bf24 100644 --- a/cc/resources/filter_display_item.h +++ b/cc/playback/filter_display_item.h @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_FILTER_DISPLAY_ITEM_H_ -#define CC_RESOURCES_FILTER_DISPLAY_ITEM_H_ +#ifndef CC_PLAYBACK_FILTER_DISPLAY_ITEM_H_ +#define CC_PLAYBACK_FILTER_DISPLAY_ITEM_H_ #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" #include "cc/output/filter_operations.h" -#include "cc/resources/display_item.h" +#include "cc/playback/display_item.h" #include "ui/gfx/geometry/rect_f.h" class SkCanvas; @@ -46,4 +46,4 @@ class CC_EXPORT EndFilterDisplayItem : public DisplayItem { } // namespace cc -#endif // CC_RESOURCES_FILTER_DISPLAY_ITEM_H_ +#endif // CC_PLAYBACK_FILTER_DISPLAY_ITEM_H_ diff --git a/cc/resources/float_clip_display_item.cc b/cc/playback/float_clip_display_item.cc similarity index 97% rename from cc/resources/float_clip_display_item.cc rename to cc/playback/float_clip_display_item.cc index 6666f8c8098a3..0f368a657702e 100644 --- a/cc/resources/float_clip_display_item.cc +++ b/cc/playback/float_clip_display_item.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/float_clip_display_item.h" +#include "cc/playback/float_clip_display_item.h" #include "base/strings/stringprintf.h" #include "base/trace_event/trace_event_argument.h" diff --git a/cc/resources/float_clip_display_item.h b/cc/playback/float_clip_display_item.h similarity index 86% rename from cc/resources/float_clip_display_item.h rename to cc/playback/float_clip_display_item.h index 2c6805979a948..2812189ff61d7 100644 --- a/cc/resources/float_clip_display_item.h +++ b/cc/playback/float_clip_display_item.h @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_FLOAT_CLIP_DISPLAY_ITEM_H_ -#define CC_RESOURCES_FLOAT_CLIP_DISPLAY_ITEM_H_ +#ifndef CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ +#define CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ #include #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" -#include "cc/resources/display_item.h" +#include "cc/playback/display_item.h" #include "ui/gfx/geometry/rect_f.h" class SkCanvas; @@ -46,4 +46,4 @@ class CC_EXPORT EndFloatClipDisplayItem : public DisplayItem { } // namespace cc -#endif // CC_RESOURCES_FLOAT_CLIP_DISPLAY_ITEM_H_ +#endif // CC_PLAYBACK_FLOAT_CLIP_DISPLAY_ITEM_H_ diff --git a/cc/resources/largest_display_item.cc b/cc/playback/largest_display_item.cc similarity index 88% rename from cc/resources/largest_display_item.cc rename to cc/playback/largest_display_item.cc index 4fd932a29da78..0ecd3d0547a9d 100644 --- a/cc/resources/largest_display_item.cc +++ b/cc/playback/largest_display_item.cc @@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/largest_display_item.h" +#include "cc/playback/largest_display_item.h" #include -#include "cc/resources/clip_display_item.h" -#include "cc/resources/clip_path_display_item.h" -#include "cc/resources/compositing_display_item.h" -#include "cc/resources/drawing_display_item.h" -#include "cc/resources/filter_display_item.h" -#include "cc/resources/float_clip_display_item.h" -#include "cc/resources/transform_display_item.h" +#include "cc/playback/clip_display_item.h" +#include "cc/playback/clip_path_display_item.h" +#include "cc/playback/compositing_display_item.h" +#include "cc/playback/drawing_display_item.h" +#include "cc/playback/filter_display_item.h" +#include "cc/playback/float_clip_display_item.h" +#include "cc/playback/transform_display_item.h" #include "third_party/skia/include/core/SkPicture.h" diff --git a/cc/resources/largest_display_item.h b/cc/playback/largest_display_item.h similarity index 69% rename from cc/resources/largest_display_item.h rename to cc/playback/largest_display_item.h index 93a18446b3e16..cce56719e4c66 100644 --- a/cc/resources/largest_display_item.h +++ b/cc/playback/largest_display_item.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_LARGEST_DISPLAY_ITEM_H_ -#define CC_RESOURCES_LARGEST_DISPLAY_ITEM_H_ +#ifndef CC_PLAYBACK_LARGEST_DISPLAY_ITEM_H_ +#define CC_PLAYBACK_LARGEST_DISPLAY_ITEM_H_ #include "base/basictypes.h" #include "cc/base/cc_export.h" @@ -14,4 +14,4 @@ CC_EXPORT size_t LargestDisplayItemSize(); } // namespace cc -#endif // CC_RESOURCES_LARGEST_DISPLAY_ITEM_H_ +#endif // CC_PLAYBACK_LARGEST_DISPLAY_ITEM_H_ diff --git a/cc/resources/picture.cc b/cc/playback/picture.cc similarity index 99% rename from cc/resources/picture.cc rename to cc/playback/picture.cc index cd465053715e2..4537bf7210712 100644 --- a/cc/resources/picture.cc +++ b/cc/playback/picture.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/picture.h" +#include "cc/playback/picture.h" #include #include diff --git a/cc/resources/picture.h b/cc/playback/picture.h similarity index 95% rename from cc/resources/picture.h rename to cc/playback/picture.h index ecbbaeec12b90..b19504b427024 100644 --- a/cc/resources/picture.h +++ b/cc/playback/picture.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_PICTURE_H_ -#define CC_RESOURCES_PICTURE_H_ +#ifndef CC_PLAYBACK_PICTURE_H_ +#define CC_PLAYBACK_PICTURE_H_ #include "base/basictypes.h" #include "base/containers/hash_tables.h" @@ -14,8 +14,8 @@ #include "base/trace_event/trace_event.h" #include "cc/base/cc_export.h" #include "cc/base/region.h" -#include "cc/resources/pixel_ref_map.h" -#include "cc/resources/recording_source.h" +#include "cc/playback/pixel_ref_map.h" +#include "cc/playback/recording_source.h" #include "skia/ext/refptr.h" #include "third_party/skia/include/core/SkPicture.h" #include "ui/gfx/geometry/rect.h" @@ -116,4 +116,4 @@ class CC_EXPORT Picture } // namespace cc -#endif // CC_RESOURCES_PICTURE_H_ +#endif // CC_PLAYBACK_PICTURE_H_ diff --git a/cc/resources/picture_pile.cc b/cc/playback/picture_pile.cc similarity index 99% rename from cc/resources/picture_pile.cc rename to cc/playback/picture_pile.cc index 2ce3e500f2ea8..b7b2822195bed 100644 --- a/cc/resources/picture_pile.cc +++ b/cc/playback/picture_pile.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/picture_pile.h" +#include "cc/playback/picture_pile.h" #include #include #include #include "cc/base/region.h" -#include "cc/resources/picture_pile_impl.h" +#include "cc/playback/picture_pile_impl.h" #include "skia/ext/analysis_canvas.h" namespace { diff --git a/cc/resources/picture_pile.h b/cc/playback/picture_pile.h similarity index 96% rename from cc/resources/picture_pile.h rename to cc/playback/picture_pile.h index a1c50bd4ccb89..889e9f5d9815b 100644 --- a/cc/resources/picture_pile.h +++ b/cc/playback/picture_pile.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_PICTURE_PILE_H_ -#define CC_RESOURCES_PICTURE_PILE_H_ +#ifndef CC_PLAYBACK_PICTURE_PILE_H_ +#define CC_PLAYBACK_PICTURE_PILE_H_ #include #include @@ -12,7 +12,7 @@ #include "base/containers/hash_tables.h" #include "base/memory/ref_counted.h" #include "cc/base/tiling_data.h" -#include "cc/resources/picture.h" +#include "cc/playback/picture.h" namespace cc { class PicturePileImpl; @@ -104,4 +104,4 @@ class CC_EXPORT PicturePile : public RecordingSource { } // namespace cc -#endif // CC_RESOURCES_PICTURE_PILE_H_ +#endif // CC_PLAYBACK_PICTURE_PILE_H_ diff --git a/cc/resources/picture_pile_impl.cc b/cc/playback/picture_pile_impl.cc similarity index 99% rename from cc/resources/picture_pile_impl.cc rename to cc/playback/picture_pile_impl.cc index 1626657a56106..96c6f63addb2f 100644 --- a/cc/resources/picture_pile_impl.cc +++ b/cc/playback/picture_pile_impl.cc @@ -9,8 +9,8 @@ #include "base/trace_event/trace_event.h" #include "cc/base/region.h" #include "cc/debug/debug_colors.h" -#include "cc/resources/picture_pile_impl.h" -#include "cc/resources/raster_source_helper.h" +#include "cc/playback/picture_pile_impl.h" +#include "cc/playback/raster_source_helper.h" #include "skia/ext/analysis_canvas.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkPictureRecorder.h" diff --git a/cc/resources/picture_pile_impl.h b/cc/playback/picture_pile_impl.h similarity index 95% rename from cc/resources/picture_pile_impl.h rename to cc/playback/picture_pile_impl.h index 1d085c1c3415a..e8be323225a39 100644 --- a/cc/resources/picture_pile_impl.h +++ b/cc/playback/picture_pile_impl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_PICTURE_PILE_IMPL_H_ -#define CC_RESOURCES_PICTURE_PILE_IMPL_H_ +#ifndef CC_PLAYBACK_PICTURE_PILE_IMPL_H_ +#define CC_PLAYBACK_PICTURE_PILE_IMPL_H_ #include #include @@ -12,9 +12,9 @@ #include "base/time/time.h" #include "cc/base/cc_export.h" #include "cc/debug/rendering_stats_instrumentation.h" -#include "cc/resources/picture_pile.h" -#include "cc/resources/pixel_ref_map.h" -#include "cc/resources/raster_source.h" +#include "cc/playback/picture_pile.h" +#include "cc/playback/pixel_ref_map.h" +#include "cc/playback/raster_source.h" #include "skia/ext/analysis_canvas.h" #include "skia/ext/refptr.h" @@ -156,4 +156,4 @@ class CC_EXPORT PicturePileImpl : public RasterSource { } // namespace cc -#endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ +#endif // CC_PLAYBACK_PICTURE_PILE_IMPL_H_ diff --git a/cc/resources/picture_pile_impl_perftest.cc b/cc/playback/picture_pile_impl_perftest.cc similarity index 98% rename from cc/resources/picture_pile_impl_perftest.cc rename to cc/playback/picture_pile_impl_perftest.cc index 7e24724197cdf..a70fe68ebde1c 100644 --- a/cc/resources/picture_pile_impl_perftest.cc +++ b/cc/playback/picture_pile_impl_perftest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/picture_pile_impl.h" +#include "cc/playback/picture_pile_impl.h" #include "cc/debug/lap_timer.h" #include "cc/test/fake_picture_pile_impl.h" diff --git a/cc/resources/picture_pile_impl_unittest.cc b/cc/playback/picture_pile_impl_unittest.cc similarity index 100% rename from cc/resources/picture_pile_impl_unittest.cc rename to cc/playback/picture_pile_impl_unittest.cc diff --git a/cc/resources/picture_pile_unittest.cc b/cc/playback/picture_pile_unittest.cc similarity index 99% rename from cc/resources/picture_pile_unittest.cc rename to cc/playback/picture_pile_unittest.cc index 882bbf457f133..f929aeffb0a4c 100644 --- a/cc/resources/picture_pile_unittest.cc +++ b/cc/playback/picture_pile_unittest.cc @@ -5,7 +5,7 @@ #include #include -#include "cc/resources/picture_pile.h" +#include "cc/playback/picture_pile.h" #include "cc/test/fake_content_layer_client.h" #include "cc/test/fake_picture_pile.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/cc/resources/picture_unittest.cc b/cc/playback/picture_unittest.cc similarity index 99% rename from cc/resources/picture_unittest.cc rename to cc/playback/picture_unittest.cc index a7d86184e447c..53310e37c8140 100644 --- a/cc/resources/picture_unittest.cc +++ b/cc/playback/picture_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/picture.h" +#include "cc/playback/picture.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" diff --git a/cc/resources/pixel_ref_map.cc b/cc/playback/pixel_ref_map.cc similarity index 97% rename from cc/resources/pixel_ref_map.cc rename to cc/playback/pixel_ref_map.cc index 4b85552fa7073..bb5a84c37b519 100644 --- a/cc/resources/pixel_ref_map.cc +++ b/cc/playback/pixel_ref_map.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/pixel_ref_map.h" +#include "cc/playback/pixel_ref_map.h" #include #include #include "cc/base/util.h" -#include "cc/resources/display_item_list.h" -#include "cc/resources/picture.h" +#include "cc/playback/display_item_list.h" +#include "cc/playback/picture.h" #include "skia/ext/pixel_ref_utils.h" namespace cc { diff --git a/cc/resources/pixel_ref_map.h b/cc/playback/pixel_ref_map.h similarity index 95% rename from cc/resources/pixel_ref_map.h rename to cc/playback/pixel_ref_map.h index b2588096da4a8..e1545217836cb 100644 --- a/cc/resources/pixel_ref_map.h +++ b/cc/playback/pixel_ref_map.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_PIXEL_REF_MAP_H_ -#define CC_RESOURCES_PIXEL_REF_MAP_H_ +#ifndef CC_PLAYBACK_PIXEL_REF_MAP_H_ +#define CC_PLAYBACK_PIXEL_REF_MAP_H_ #include #include @@ -91,4 +91,4 @@ class CC_EXPORT PixelRefMap { } // namespace cc -#endif // CC_RESOURCES_PIXEL_REF_MAP_H_ +#endif // CC_PLAYBACK_PIXEL_REF_MAP_H_ diff --git a/cc/resources/pixel_ref_map_unittest.cc b/cc/playback/pixel_ref_map_unittest.cc similarity index 99% rename from cc/resources/pixel_ref_map_unittest.cc rename to cc/playback/pixel_ref_map_unittest.cc index 4c40336bccbb6..af88b44c8731c 100644 --- a/cc/resources/pixel_ref_map_unittest.cc +++ b/cc/playback/pixel_ref_map_unittest.cc @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/pixel_ref_map.h" +#include "cc/playback/pixel_ref_map.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "base/values.h" -#include "cc/resources/picture.h" +#include "cc/playback/picture.h" #include "cc/test/fake_content_layer_client.h" #include "cc/test/skia_common.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/cc/resources/raster_source.h b/cc/playback/raster_source.h similarity index 97% rename from cc/resources/raster_source.h rename to cc/playback/raster_source.h index 171d2a55412b9..c0a484aa8d9a2 100644 --- a/cc/resources/raster_source.h +++ b/cc/playback/raster_source.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_RASTER_SOURCE_H_ -#define CC_RESOURCES_RASTER_SOURCE_H_ +#ifndef CC_PLAYBACK_RASTER_SOURCE_H_ +#define CC_PLAYBACK_RASTER_SOURCE_H_ #include @@ -113,4 +113,4 @@ class CC_EXPORT RasterSource : public base::RefCountedThreadSafe { } // namespace cc -#endif // CC_RESOURCES_RASTER_SOURCE_H_ +#endif // CC_PLAYBACK_RASTER_SOURCE_H_ diff --git a/cc/resources/raster_source_helper.cc b/cc/playback/raster_source_helper.cc similarity index 98% rename from cc/resources/raster_source_helper.cc rename to cc/playback/raster_source_helper.cc index 34436e4a3f04c..6510b3c0e7866 100644 --- a/cc/resources/raster_source_helper.cc +++ b/cc/playback/raster_source_helper.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/raster_source_helper.h" +#include "cc/playback/raster_source_helper.h" #include "base/trace_event/trace_event.h" #include "cc/debug/debug_colors.h" diff --git a/cc/resources/raster_source_helper.h b/cc/playback/raster_source_helper.h similarity index 86% rename from cc/resources/raster_source_helper.h rename to cc/playback/raster_source_helper.h index abdea3efa6100..30513030351f4 100644 --- a/cc/resources/raster_source_helper.h +++ b/cc/playback/raster_source_helper.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_RASTER_SOURCE_HELPER_H_ -#define CC_RESOURCES_RASTER_SOURCE_HELPER_H_ +#ifndef CC_PLAYBACK_RASTER_SOURCE_HELPER_H_ +#define CC_PLAYBACK_RASTER_SOURCE_HELPER_H_ #include "cc/base/cc_export.h" #include "third_party/skia/include/core/SkColor.h" @@ -26,4 +26,4 @@ class CC_EXPORT RasterSourceHelper { } // namespace cc -#endif // CC_RESOURCES_RASTER_SOURCE_HELPER_H_ +#endif // CC_PLAYBACK_RASTER_SOURCE_HELPER_H_ diff --git a/cc/resources/recording_source.h b/cc/playback/recording_source.h similarity index 94% rename from cc/resources/recording_source.h rename to cc/playback/recording_source.h index a95ba73acd740..cf8c7c466f584 100644 --- a/cc/resources/recording_source.h +++ b/cc/playback/recording_source.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_RECORDING_SOURCE_H_ -#define CC_RESOURCES_RECORDING_SOURCE_H_ +#ifndef CC_PLAYBACK_RECORDING_SOURCE_H_ +#define CC_PLAYBACK_RECORDING_SOURCE_H_ #include "base/memory/ref_counted.h" #include "cc/base/cc_export.h" @@ -60,4 +60,4 @@ class CC_EXPORT RecordingSource { } // namespace cc -#endif // CC_RESOURCES_RECORDING_SOURCE_H_ +#endif // CC_PLAYBACK_RECORDING_SOURCE_H_ diff --git a/cc/resources/recording_source_unittest.cc b/cc/playback/recording_source_unittest.cc similarity index 99% rename from cc/resources/recording_source_unittest.cc rename to cc/playback/recording_source_unittest.cc index 1e0bd42b67751..01a89a19ba30b 100644 --- a/cc/resources/recording_source_unittest.cc +++ b/cc/playback/recording_source_unittest.cc @@ -4,7 +4,7 @@ #include -#include "cc/resources/display_list_raster_source.h" +#include "cc/playback/display_list_raster_source.h" #include "cc/test/fake_display_list_recording_source.h" #include "cc/test/fake_picture_pile.h" #include "cc/test/fake_picture_pile_impl.h" diff --git a/cc/resources/transform_display_item.cc b/cc/playback/transform_display_item.cc similarity index 97% rename from cc/resources/transform_display_item.cc rename to cc/playback/transform_display_item.cc index 21077158b8c5f..1f4e5dbd7339c 100644 --- a/cc/resources/transform_display_item.cc +++ b/cc/playback/transform_display_item.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/transform_display_item.h" +#include "cc/playback/transform_display_item.h" #include "base/strings/stringprintf.h" #include "base/trace_event/trace_event_argument.h" diff --git a/cc/resources/transform_display_item.h b/cc/playback/transform_display_item.h similarity index 86% rename from cc/resources/transform_display_item.h rename to cc/playback/transform_display_item.h index 2534f254a4e37..731249d338e79 100644 --- a/cc/resources/transform_display_item.h +++ b/cc/playback/transform_display_item.h @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TRANSFORM_DISPLAY_ITEM_H_ -#define CC_RESOURCES_TRANSFORM_DISPLAY_ITEM_H_ +#ifndef CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_ +#define CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_ #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" -#include "cc/resources/display_item.h" +#include "cc/playback/display_item.h" #include "ui/gfx/transform.h" class SkCanvas; @@ -44,4 +44,4 @@ class CC_EXPORT EndTransformDisplayItem : public DisplayItem { } // namespace cc -#endif // CC_RESOURCES_TRANSFORM_DISPLAY_ITEM_H_ +#endif // CC_PLAYBACK_TRANSFORM_DISPLAY_ITEM_H_ diff --git a/cc/quads/list_container.cc b/cc/quads/list_container.cc index c22716ab2789a..4edcbdfab560a 100644 --- a/cc/quads/list_container.cc +++ b/cc/quads/list_container.cc @@ -8,9 +8,9 @@ #include #include "cc/base/scoped_ptr_vector.h" +#include "cc/playback/display_item.h" #include "cc/quads/draw_quad.h" #include "cc/quads/shared_quad_state.h" -#include "cc/resources/display_item.h" namespace { const size_t kDefaultNumElementTypesToReserve = 32; diff --git a/cc/quads/picture_draw_quad.h b/cc/quads/picture_draw_quad.h index 31e5601ee7109..243a2f9d174c2 100644 --- a/cc/quads/picture_draw_quad.h +++ b/cc/quads/picture_draw_quad.h @@ -8,8 +8,8 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "cc/base/cc_export.h" +#include "cc/playback/raster_source.h" #include "cc/quads/content_draw_quad_base.h" -#include "cc/resources/raster_source.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect_f.h" #include "ui/gfx/geometry/size.h" diff --git a/cc/resources/bitmap_tile_task_worker_pool.cc b/cc/raster/bitmap_tile_task_worker_pool.cc similarity index 98% rename from cc/resources/bitmap_tile_task_worker_pool.cc rename to cc/raster/bitmap_tile_task_worker_pool.cc index 1abbb46420692..1792a2053da7b 100644 --- a/cc/resources/bitmap_tile_task_worker_pool.cc +++ b/cc/raster/bitmap_tile_task_worker_pool.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/bitmap_tile_task_worker_pool.h" +#include "cc/raster/bitmap_tile_task_worker_pool.h" #include @@ -10,8 +10,8 @@ #include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event_argument.h" #include "cc/debug/traced_value.h" -#include "cc/resources/raster_buffer.h" -#include "cc/resources/raster_source.h" +#include "cc/playback/raster_source.h" +#include "cc/raster/raster_buffer.h" #include "cc/resources/resource.h" namespace cc { diff --git a/cc/resources/bitmap_tile_task_worker_pool.h b/cc/raster/bitmap_tile_task_worker_pool.h similarity index 90% rename from cc/resources/bitmap_tile_task_worker_pool.h rename to cc/raster/bitmap_tile_task_worker_pool.h index 3f03c2db9f65d..4fcfd5a33f93c 100644 --- a/cc/resources/bitmap_tile_task_worker_pool.h +++ b/cc/raster/bitmap_tile_task_worker_pool.h @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_BITMAP_TILE_TASK_WORKER_POOL_H_ -#define CC_RESOURCES_BITMAP_TILE_TASK_WORKER_POOL_H_ +#ifndef CC_RASTER_BITMAP_TILE_TASK_WORKER_POOL_H_ +#define CC_RASTER_BITMAP_TILE_TASK_WORKER_POOL_H_ #include "base/memory/weak_ptr.h" #include "base/values.h" -#include "cc/resources/tile_task_runner.h" -#include "cc/resources/tile_task_worker_pool.h" +#include "cc/raster/tile_task_runner.h" +#include "cc/raster/tile_task_worker_pool.h" namespace base { namespace trace_event { @@ -78,4 +78,4 @@ class CC_EXPORT BitmapTileTaskWorkerPool : public TileTaskWorkerPool, } // namespace cc -#endif // CC_RESOURCES_BITMAP_TILE_TASK_WORKER_POOL_H_ +#endif // CC_RASTER_BITMAP_TILE_TASK_WORKER_POOL_H_ diff --git a/cc/resources/gpu_rasterizer.cc b/cc/raster/gpu_rasterizer.cc similarity index 93% rename from cc/resources/gpu_rasterizer.cc rename to cc/raster/gpu_rasterizer.cc index a1d33bcdb96fc..17a9322bebe46 100644 --- a/cc/resources/gpu_rasterizer.cc +++ b/cc/raster/gpu_rasterizer.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/gpu_rasterizer.h" +#include "cc/raster/gpu_rasterizer.h" #include @@ -12,12 +12,12 @@ #include "cc/debug/devtools_instrumentation.h" #include "cc/debug/frame_viewer_instrumentation.h" #include "cc/output/context_provider.h" -#include "cc/resources/raster_buffer.h" -#include "cc/resources/raster_source.h" +#include "cc/playback/raster_source.h" +#include "cc/raster/raster_buffer.h" +#include "cc/raster/scoped_gpu_raster.h" #include "cc/resources/resource.h" #include "cc/resources/resource_provider.h" -#include "cc/resources/scoped_gpu_raster.h" -#include "cc/resources/tile_manager.h" +#include "cc/tiles/tile_manager.h" #include "gpu/command_buffer/client/gles2_interface.h" #include "third_party/skia/include/core/SkMultiPictureDraw.h" #include "third_party/skia/include/core/SkPictureRecorder.h" diff --git a/cc/resources/gpu_rasterizer.h b/cc/raster/gpu_rasterizer.h similarity index 88% rename from cc/resources/gpu_rasterizer.h rename to cc/raster/gpu_rasterizer.h index 0a24e57b44d6e..443e6efeb8597 100644 --- a/cc/resources/gpu_rasterizer.h +++ b/cc/raster/gpu_rasterizer.h @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_GPU_RASTERIZER_H_ -#define CC_RESOURCES_GPU_RASTERIZER_H_ +#ifndef CC_RASTER_GPU_RASTERIZER_H_ +#define CC_RASTER_GPU_RASTERIZER_H_ #include #include "cc/base/cc_export.h" #include "cc/resources/resource_pool.h" -#include "cc/resources/tile.h" +#include "cc/tiles/tile.h" #include "third_party/skia/include/core/SkMultiPictureDraw.h" namespace cc { @@ -46,4 +46,4 @@ class CC_EXPORT GpuRasterizer { } // namespace cc -#endif // CC_RESOURCES_GPU_RASTERIZER_H_ +#endif // CC_RASTER_GPU_RASTERIZER_H_ diff --git a/cc/resources/gpu_tile_task_worker_pool.cc b/cc/raster/gpu_tile_task_worker_pool.cc similarity index 97% rename from cc/resources/gpu_tile_task_worker_pool.cc rename to cc/raster/gpu_tile_task_worker_pool.cc index bfda392b9f33f..24a4710530e7b 100644 --- a/cc/resources/gpu_tile_task_worker_pool.cc +++ b/cc/raster/gpu_tile_task_worker_pool.cc @@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/gpu_tile_task_worker_pool.h" +#include "cc/raster/gpu_tile_task_worker_pool.h" #include #include "base/trace_event/trace_event.h" -#include "cc/resources/gpu_rasterizer.h" -#include "cc/resources/raster_buffer.h" -#include "cc/resources/raster_source.h" +#include "cc/playback/raster_source.h" +#include "cc/raster/gpu_rasterizer.h" +#include "cc/raster/raster_buffer.h" +#include "cc/raster/scoped_gpu_raster.h" #include "cc/resources/resource.h" -#include "cc/resources/scoped_gpu_raster.h" #include "gpu/command_buffer/client/gles2_interface.h" #include "third_party/skia/include/core/SkMultiPictureDraw.h" #include "third_party/skia/include/core/SkPictureRecorder.h" diff --git a/cc/resources/gpu_tile_task_worker_pool.h b/cc/raster/gpu_tile_task_worker_pool.h similarity index 91% rename from cc/resources/gpu_tile_task_worker_pool.h rename to cc/raster/gpu_tile_task_worker_pool.h index 630edced3daad..4e35eaa380aa9 100644 --- a/cc/resources/gpu_tile_task_worker_pool.h +++ b/cc/raster/gpu_tile_task_worker_pool.h @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_GPU_TILE_TASK_WORKER_POOL_H_ -#define CC_RESOURCES_GPU_TILE_TASK_WORKER_POOL_H_ +#ifndef CC_RASTER_GPU_TILE_TASK_WORKER_POOL_H_ +#define CC_RASTER_GPU_TILE_TASK_WORKER_POOL_H_ #include "base/memory/weak_ptr.h" -#include "cc/resources/tile_task_runner.h" -#include "cc/resources/tile_task_worker_pool.h" +#include "cc/raster/tile_task_runner.h" +#include "cc/raster/tile_task_worker_pool.h" namespace cc { class ContextProvider; @@ -79,4 +79,4 @@ class CC_EXPORT GpuTileTaskWorkerPool : public TileTaskWorkerPool, } // namespace cc -#endif // CC_RESOURCES_GPU_TILE_TASK_WORKER_POOL_H_ +#endif // CC_RASTER_GPU_TILE_TASK_WORKER_POOL_H_ diff --git a/cc/resources/one_copy_tile_task_worker_pool.cc b/cc/raster/one_copy_tile_task_worker_pool.cc similarity index 99% rename from cc/resources/one_copy_tile_task_worker_pool.cc rename to cc/raster/one_copy_tile_task_worker_pool.cc index 23f372c15e2b1..d504be8fbf678 100644 --- a/cc/resources/one_copy_tile_task_worker_pool.cc +++ b/cc/raster/one_copy_tile_task_worker_pool.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/one_copy_tile_task_worker_pool.h" +#include "cc/raster/one_copy_tile_task_worker_pool.h" #include #include @@ -11,7 +11,7 @@ #include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event_argument.h" #include "cc/debug/traced_value.h" -#include "cc/resources/raster_buffer.h" +#include "cc/raster/raster_buffer.h" #include "cc/resources/resource_pool.h" #include "cc/resources/scoped_resource.h" #include "gpu/command_buffer/client/gles2_interface.h" diff --git a/cc/resources/one_copy_tile_task_worker_pool.h b/cc/raster/one_copy_tile_task_worker_pool.h similarity index 95% rename from cc/resources/one_copy_tile_task_worker_pool.h rename to cc/raster/one_copy_tile_task_worker_pool.h index 5199667762390..35b8873033a1d 100644 --- a/cc/resources/one_copy_tile_task_worker_pool.h +++ b/cc/raster/one_copy_tile_task_worker_pool.h @@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_ -#define CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_ +#ifndef CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ +#define CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ #include "base/memory/weak_ptr.h" #include "base/synchronization/lock.h" #include "base/values.h" #include "cc/base/scoped_ptr_deque.h" #include "cc/output/context_provider.h" +#include "cc/raster/tile_task_runner.h" +#include "cc/raster/tile_task_worker_pool.h" #include "cc/resources/resource_provider.h" -#include "cc/resources/tile_task_runner.h" -#include "cc/resources/tile_task_worker_pool.h" namespace base { namespace trace_event { @@ -141,4 +141,4 @@ class CC_EXPORT OneCopyTileTaskWorkerPool : public TileTaskWorkerPool, } // namespace cc -#endif // CC_RESOURCES_ONE_COPY_TILE_TASK_WORKER_POOL_H_ +#endif // CC_RASTER_ONE_COPY_TILE_TASK_WORKER_POOL_H_ diff --git a/cc/resources/pixel_buffer_tile_task_worker_pool.cc b/cc/raster/pixel_buffer_tile_task_worker_pool.cc similarity index 99% rename from cc/resources/pixel_buffer_tile_task_worker_pool.cc rename to cc/raster/pixel_buffer_tile_task_worker_pool.cc index f74e066e1a33e..674e145c53457 100644 --- a/cc/resources/pixel_buffer_tile_task_worker_pool.cc +++ b/cc/raster/pixel_buffer_tile_task_worker_pool.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/pixel_buffer_tile_task_worker_pool.h" +#include "cc/raster/pixel_buffer_tile_task_worker_pool.h" #include @@ -11,7 +11,7 @@ #include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event_argument.h" #include "cc/debug/traced_value.h" -#include "cc/resources/raster_buffer.h" +#include "cc/raster/raster_buffer.h" #include "cc/resources/resource.h" #include "gpu/command_buffer/client/gles2_interface.h" diff --git a/cc/resources/pixel_buffer_tile_task_worker_pool.h b/cc/raster/pixel_buffer_tile_task_worker_pool.h similarity index 94% rename from cc/resources/pixel_buffer_tile_task_worker_pool.h rename to cc/raster/pixel_buffer_tile_task_worker_pool.h index 82e5916350225..e6ddd39312d46 100644 --- a/cc/resources/pixel_buffer_tile_task_worker_pool.h +++ b/cc/raster/pixel_buffer_tile_task_worker_pool.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_PIXEL_BUFFER_TILE_TASK_WORKER_POOL_H_ -#define CC_RESOURCES_PIXEL_BUFFER_TILE_TASK_WORKER_POOL_H_ +#ifndef CC_RASTER_PIXEL_BUFFER_TILE_TASK_WORKER_POOL_H_ +#define CC_RASTER_PIXEL_BUFFER_TILE_TASK_WORKER_POOL_H_ #include #include @@ -12,8 +12,8 @@ #include "base/values.h" #include "cc/base/delayed_unique_notifier.h" #include "cc/output/context_provider.h" -#include "cc/resources/tile_task_runner.h" -#include "cc/resources/tile_task_worker_pool.h" +#include "cc/raster/tile_task_runner.h" +#include "cc/raster/tile_task_worker_pool.h" namespace base { namespace trace_event { @@ -140,4 +140,4 @@ class CC_EXPORT PixelBufferTileTaskWorkerPool : public TileTaskWorkerPool, } // namespace cc -#endif // CC_RESOURCES_PIXEL_BUFFER_TILE_TASK_WORKER_POOL_H_ +#endif // CC_RASTER_PIXEL_BUFFER_TILE_TASK_WORKER_POOL_H_ diff --git a/cc/resources/raster_buffer.cc b/cc/raster/raster_buffer.cc similarity index 87% rename from cc/resources/raster_buffer.cc rename to cc/raster/raster_buffer.cc index 8f5671720e386..390fbd6cbbc29 100644 --- a/cc/resources/raster_buffer.cc +++ b/cc/raster/raster_buffer.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/raster_buffer.h" +#include "cc/raster/raster_buffer.h" namespace cc { diff --git a/cc/resources/raster_buffer.h b/cc/raster/raster_buffer.h similarity index 81% rename from cc/resources/raster_buffer.h rename to cc/raster/raster_buffer.h index 2a72203da4b92..8f3a56200f668 100644 --- a/cc/resources/raster_buffer.h +++ b/cc/raster/raster_buffer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_RASTER_BUFFER_H_ -#define CC_RESOURCES_RASTER_BUFFER_H_ +#ifndef CC_RASTER_RASTER_BUFFER_H_ +#define CC_RASTER_RASTER_BUFFER_H_ #include "cc/base/cc_export.h" #include "ui/gfx/geometry/rect.h" @@ -23,4 +23,4 @@ class CC_EXPORT RasterBuffer { } // namespace cc -#endif // CC_RESOURCES_RASTER_BUFFER_H_ +#endif // CC_RASTER_RASTER_BUFFER_H_ diff --git a/cc/resources/scoped_gpu_raster.cc b/cc/raster/scoped_gpu_raster.cc similarity index 97% rename from cc/resources/scoped_gpu_raster.cc rename to cc/raster/scoped_gpu_raster.cc index 2f5c5c9c3426a..f548515b69850 100644 --- a/cc/resources/scoped_gpu_raster.cc +++ b/cc/raster/scoped_gpu_raster.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/scoped_gpu_raster.h" +#include "cc/raster/scoped_gpu_raster.h" #include "gpu/command_buffer/client/gles2_interface.h" #include "third_party/khronos/GLES2/gl2.h" #include "third_party/khronos/GLES2/gl2ext.h" diff --git a/cc/resources/scoped_gpu_raster.h b/cc/raster/scoped_gpu_raster.h similarity index 86% rename from cc/resources/scoped_gpu_raster.h rename to cc/raster/scoped_gpu_raster.h index e70ebd0c35491..d9613b3c5fbd6 100644 --- a/cc/resources/scoped_gpu_raster.h +++ b/cc/raster/scoped_gpu_raster.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_SCOPED_GPU_RASTER_H_ -#define CC_RESOURCES_SCOPED_GPU_RASTER_H_ +#ifndef CC_RASTER_SCOPED_GPU_RASTER_H_ +#define CC_RASTER_SCOPED_GPU_RASTER_H_ #include "base/logging.h" #include "base/memory/scoped_ptr.h" @@ -31,4 +31,4 @@ class CC_EXPORT ScopedGpuRaster { } // namespace cc -#endif // CC_RESOURCES_SCOPED_GPU_RASTER_H_ +#endif // CC_RASTER_SCOPED_GPU_RASTER_H_ diff --git a/cc/resources/scoped_gpu_raster_unittest.cc b/cc/raster/scoped_gpu_raster_unittest.cc similarity index 96% rename from cc/resources/scoped_gpu_raster_unittest.cc rename to cc/raster/scoped_gpu_raster_unittest.cc index b1f60a3c29b0c..7ffb464176dcd 100644 --- a/cc/resources/scoped_gpu_raster_unittest.cc +++ b/cc/raster/scoped_gpu_raster_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/scoped_gpu_raster.h" +#include "cc/raster/scoped_gpu_raster.h" #include "cc/test/test_context_provider.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/cc/resources/task_graph_runner.cc b/cc/raster/task_graph_runner.cc similarity index 99% rename from cc/resources/task_graph_runner.cc rename to cc/raster/task_graph_runner.cc index e0b3f4ce7a65e..c810aa59c0b3c 100644 --- a/cc/resources/task_graph_runner.cc +++ b/cc/raster/task_graph_runner.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/task_graph_runner.h" +#include "cc/raster/task_graph_runner.h" #include diff --git a/cc/resources/task_graph_runner.h b/cc/raster/task_graph_runner.h similarity index 98% rename from cc/resources/task_graph_runner.h rename to cc/raster/task_graph_runner.h index 2ff085d76cb9f..a54984353b0b7 100644 --- a/cc/resources/task_graph_runner.h +++ b/cc/raster/task_graph_runner.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TASK_GRAPH_RUNNER_H_ -#define CC_RESOURCES_TASK_GRAPH_RUNNER_H_ +#ifndef CC_RASTER_TASK_GRAPH_RUNNER_H_ +#define CC_RASTER_TASK_GRAPH_RUNNER_H_ #include #include @@ -229,4 +229,4 @@ class CC_EXPORT TaskGraphRunner { } // namespace cc -#endif // CC_RESOURCES_TASK_GRAPH_RUNNER_H_ +#endif // CC_RASTER_TASK_GRAPH_RUNNER_H_ diff --git a/cc/resources/task_graph_runner_perftest.cc b/cc/raster/task_graph_runner_perftest.cc similarity index 99% rename from cc/resources/task_graph_runner_perftest.cc rename to cc/raster/task_graph_runner_perftest.cc index cbd5c5cfc6cac..cc617443e1741 100644 --- a/cc/resources/task_graph_runner_perftest.cc +++ b/cc/raster/task_graph_runner_perftest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/task_graph_runner.h" +#include "cc/raster/task_graph_runner.h" #include diff --git a/cc/resources/task_graph_runner_unittest.cc b/cc/raster/task_graph_runner_unittest.cc similarity index 99% rename from cc/resources/task_graph_runner_unittest.cc rename to cc/raster/task_graph_runner_unittest.cc index afc369d737a57..eb9b6d954b724 100644 --- a/cc/resources/task_graph_runner_unittest.cc +++ b/cc/raster/task_graph_runner_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/task_graph_runner.h" +#include "cc/raster/task_graph_runner.h" #include diff --git a/cc/resources/texture_compressor.cc b/cc/raster/texture_compressor.cc similarity index 81% rename from cc/resources/texture_compressor.cc rename to cc/raster/texture_compressor.cc index a32615cb7a5b1..b8992bb9eefc8 100644 --- a/cc/resources/texture_compressor.cc +++ b/cc/raster/texture_compressor.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/texture_compressor.h" +#include "cc/raster/texture_compressor.h" #include "base/logging.h" -#include "cc/resources/texture_compressor_etc1.h" +#include "cc/raster/texture_compressor_etc1.h" #if defined(ARCH_CPU_X86_FAMILY) #include "base/cpu.h" -#include "cc/resources/texture_compressor_etc1_sse.h" +#include "cc/raster/texture_compressor_etc1_sse.h" #endif namespace cc { diff --git a/cc/resources/texture_compressor.h b/cc/raster/texture_compressor.h similarity index 86% rename from cc/resources/texture_compressor.h rename to cc/raster/texture_compressor.h index 18faa40bac5d1..95536bcb40c6b 100644 --- a/cc/resources/texture_compressor.h +++ b/cc/raster/texture_compressor.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TEXTURE_COMPRESSOR_H_ -#define CC_RESOURCES_TEXTURE_COMPRESSOR_H_ +#ifndef CC_RASTER_TEXTURE_COMPRESSOR_H_ +#define CC_RASTER_TEXTURE_COMPRESSOR_H_ #include @@ -43,4 +43,4 @@ class CC_EXPORT TextureCompressor { } // namespace cc -#endif // CC_RESOURCES_TEXTURE_COMPRESSOR_H_ +#endif // CC_RASTER_TEXTURE_COMPRESSOR_H_ diff --git a/cc/resources/texture_compressor_etc1.cc b/cc/raster/texture_compressor_etc1.cc similarity index 99% rename from cc/resources/texture_compressor_etc1.cc rename to cc/raster/texture_compressor_etc1.cc index 83c3f9fb03480..e02737cc078cc 100644 --- a/cc/resources/texture_compressor_etc1.cc +++ b/cc/raster/texture_compressor_etc1.cc @@ -5,7 +5,7 @@ // See the following specification for details on the ETC1 format: // https://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt -#include "cc/resources/texture_compressor_etc1.h" +#include "cc/raster/texture_compressor_etc1.h" #include #include diff --git a/cc/resources/texture_compressor_etc1.h b/cc/raster/texture_compressor_etc1.h similarity index 97% rename from cc/resources/texture_compressor_etc1.h rename to cc/raster/texture_compressor_etc1.h index 105f6e9ea3c93..2d2771a888c0c 100644 --- a/cc/resources/texture_compressor_etc1.h +++ b/cc/raster/texture_compressor_etc1.h @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TEXTURE_COMPRESSOR_ETC1_H_ -#define CC_RESOURCES_TEXTURE_COMPRESSOR_ETC1_H_ +#ifndef CC_RASTER_TEXTURE_COMPRESSOR_ETC1_H_ +#define CC_RASTER_TEXTURE_COMPRESSOR_ETC1_H_ -#include "cc/resources/texture_compressor.h" +#include "cc/raster/texture_compressor.h" #include "base/compiler_specific.h" #include "base/logging.h" @@ -203,4 +203,4 @@ class CC_EXPORT TextureCompressorETC1 : public TextureCompressor { } // namespace cc -#endif // CC_RESOURCES_TEXTURE_COMPRESSOR_ETC1_H_ +#endif // CC_RASTER_TEXTURE_COMPRESSOR_ETC1_H_ diff --git a/cc/resources/texture_compressor_etc1_sse.cc b/cc/raster/texture_compressor_etc1_sse.cc similarity index 99% rename from cc/resources/texture_compressor_etc1_sse.cc rename to cc/raster/texture_compressor_etc1_sse.cc index 92ece570bb89f..229782238bef4 100644 --- a/cc/resources/texture_compressor_etc1_sse.cc +++ b/cc/raster/texture_compressor_etc1_sse.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/texture_compressor_etc1_sse.h" +#include "cc/raster/texture_compressor_etc1_sse.h" #include @@ -10,7 +10,7 @@ #include "base/logging.h" // Using this header for common functions such as Color handling // and codeword table. -#include "cc/resources/texture_compressor_etc1.h" +#include "cc/raster/texture_compressor_etc1.h" namespace cc { diff --git a/cc/resources/texture_compressor_etc1_sse.h b/cc/raster/texture_compressor_etc1_sse.h similarity index 77% rename from cc/resources/texture_compressor_etc1_sse.h rename to cc/raster/texture_compressor_etc1_sse.h index 48b81c59b8553..3822699e4d036 100644 --- a/cc/resources/texture_compressor_etc1_sse.h +++ b/cc/raster/texture_compressor_etc1_sse.h @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TEXTURE_COMPRESSOR_ETC1_SSE_H_ -#define CC_RESOURCES_TEXTURE_COMPRESSOR_ETC1_SSE_H_ +#ifndef CC_RASTER_TEXTURE_COMPRESSOR_ETC1_SSE_H_ +#define CC_RASTER_TEXTURE_COMPRESSOR_ETC1_SSE_H_ -#include "cc/resources/texture_compressor.h" +#include "cc/raster/texture_compressor.h" namespace cc { @@ -28,4 +28,4 @@ class CC_EXPORT TextureCompressorETC1SSE : public TextureCompressor { } // namespace cc -#endif // CC_RESOURCES_TEXTURE_COMPRESSOR_ETC1_SSE_H_ +#endif // CC_RASTER_TEXTURE_COMPRESSOR_ETC1_SSE_H_ diff --git a/cc/resources/texture_compressor_etc1_unittest.cc b/cc/raster/texture_compressor_etc1_unittest.cc similarity index 97% rename from cc/resources/texture_compressor_etc1_unittest.cc rename to cc/raster/texture_compressor_etc1_unittest.cc index 239accc57f5e8..98ccd77560f56 100644 --- a/cc/resources/texture_compressor_etc1_unittest.cc +++ b/cc/raster/texture_compressor_etc1_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/texture_compressor.h" +#include "cc/raster/texture_compressor.h" #include "cc/base/util.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/cc/resources/texture_compressor_perftest.cc b/cc/raster/texture_compressor_perftest.cc similarity index 98% rename from cc/resources/texture_compressor_perftest.cc rename to cc/raster/texture_compressor_perftest.cc index d2ad5bcc21aea..4b2967c0ba646 100644 --- a/cc/resources/texture_compressor_perftest.cc +++ b/cc/raster/texture_compressor_perftest.cc @@ -4,7 +4,7 @@ #include "base/logging.h" #include "cc/debug/lap_timer.h" -#include "cc/resources/texture_compressor.h" +#include "cc/raster/texture_compressor.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/perf/perf_test.h" diff --git a/cc/resources/tile_task_runner.cc b/cc/raster/tile_task_runner.cc similarity index 97% rename from cc/resources/tile_task_runner.cc rename to cc/raster/tile_task_runner.cc index 0ebde05cc02f9..5450c5f777e0a 100644 --- a/cc/resources/tile_task_runner.cc +++ b/cc/raster/tile_task_runner.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/tile_task_runner.h" +#include "cc/raster/tile_task_runner.h" #include diff --git a/cc/resources/tile_task_runner.h b/cc/raster/tile_task_runner.h similarity index 96% rename from cc/resources/tile_task_runner.h rename to cc/raster/tile_task_runner.h index 70c2c25e27d56..234ca6f04ab5f 100644 --- a/cc/resources/tile_task_runner.h +++ b/cc/raster/tile_task_runner.h @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TILE_TASK_RUNNER_H_ -#define CC_RESOURCES_TILE_TASK_RUNNER_H_ +#ifndef CC_RASTER_TILE_TASK_RUNNER_H_ +#define CC_RASTER_TILE_TASK_RUNNER_H_ #include #include #include "base/callback.h" +#include "cc/raster/task_graph_runner.h" #include "cc/resources/resource_format.h" -#include "cc/resources/task_graph_runner.h" namespace cc { class ImageDecodeTask; @@ -169,4 +169,4 @@ class CC_EXPORT TileTaskRunner { } // namespace cc -#endif // CC_RESOURCES_TILE_TASK_RUNNER_H_ +#endif // CC_RASTER_TILE_TASK_RUNNER_H_ diff --git a/cc/resources/tile_task_worker_pool.cc b/cc/raster/tile_task_worker_pool.cc similarity index 98% rename from cc/resources/tile_task_worker_pool.cc rename to cc/raster/tile_task_worker_pool.cc index 130dc06daef53..477acc3126341 100644 --- a/cc/resources/tile_task_worker_pool.cc +++ b/cc/raster/tile_task_worker_pool.cc @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/tile_task_worker_pool.h" +#include "cc/raster/tile_task_worker_pool.h" #include #include "base/trace_event/trace_event.h" -#include "cc/resources/raster_source.h" +#include "cc/playback/raster_source.h" #include "skia/ext/refptr.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkSurface.h" diff --git a/cc/resources/tile_task_worker_pool.h b/cc/raster/tile_task_worker_pool.h similarity index 92% rename from cc/resources/tile_task_worker_pool.h rename to cc/raster/tile_task_worker_pool.h index 90adfd1ab05e4..75916f5dd6f2e 100644 --- a/cc/resources/tile_task_worker_pool.h +++ b/cc/raster/tile_task_worker_pool.h @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TILE_TASK_WORKER_POOL_H_ -#define CC_RESOURCES_TILE_TASK_WORKER_POOL_H_ +#ifndef CC_RASTER_TILE_TASK_WORKER_POOL_H_ +#define CC_RASTER_TILE_TASK_WORKER_POOL_H_ -#include "cc/resources/tile_task_runner.h" +#include "cc/raster/tile_task_runner.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/size.h" @@ -69,4 +69,4 @@ class CC_EXPORT TileTaskWorkerPool { } // namespace cc -#endif // CC_RESOURCES_TILE_TASK_WORKER_POOL_H_ +#endif // CC_RASTER_TILE_TASK_WORKER_POOL_H_ diff --git a/cc/resources/tile_task_worker_pool_perftest.cc b/cc/raster/tile_task_worker_pool_perftest.cc similarity index 97% rename from cc/resources/tile_task_worker_pool_perftest.cc rename to cc/raster/tile_task_worker_pool_perftest.cc index 27b0154697edc..508f966eeb7b7 100644 --- a/cc/resources/tile_task_worker_pool_perftest.cc +++ b/cc/raster/tile_task_worker_pool_perftest.cc @@ -2,23 +2,23 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/tile_task_worker_pool.h" +#include "cc/raster/tile_task_worker_pool.h" #include "base/test/test_simple_task_runner.h" #include "base/time/time.h" #include "cc/debug/lap_timer.h" #include "cc/output/context_provider.h" -#include "cc/resources/bitmap_tile_task_worker_pool.h" -#include "cc/resources/gpu_rasterizer.h" -#include "cc/resources/gpu_tile_task_worker_pool.h" -#include "cc/resources/one_copy_tile_task_worker_pool.h" -#include "cc/resources/pixel_buffer_tile_task_worker_pool.h" -#include "cc/resources/raster_buffer.h" +#include "cc/raster/bitmap_tile_task_worker_pool.h" +#include "cc/raster/gpu_rasterizer.h" +#include "cc/raster/gpu_tile_task_worker_pool.h" +#include "cc/raster/one_copy_tile_task_worker_pool.h" +#include "cc/raster/pixel_buffer_tile_task_worker_pool.h" +#include "cc/raster/raster_buffer.h" +#include "cc/raster/tile_task_runner.h" +#include "cc/raster/zero_copy_tile_task_worker_pool.h" #include "cc/resources/resource_pool.h" #include "cc/resources/resource_provider.h" #include "cc/resources/scoped_resource.h" -#include "cc/resources/tile_task_runner.h" -#include "cc/resources/zero_copy_tile_task_worker_pool.h" #include "cc/test/fake_output_surface.h" #include "cc/test/fake_output_surface_client.h" #include "cc/test/test_context_support.h" diff --git a/cc/resources/tile_task_worker_pool_unittest.cc b/cc/raster/tile_task_worker_pool_unittest.cc similarity index 96% rename from cc/resources/tile_task_worker_pool_unittest.cc rename to cc/raster/tile_task_worker_pool_unittest.cc index 34de309356a65..7394af59a908d 100644 --- a/cc/resources/tile_task_worker_pool_unittest.cc +++ b/cc/raster/tile_task_worker_pool_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/tile_task_worker_pool.h" +#include "cc/raster/tile_task_worker_pool.h" #include #include @@ -12,19 +12,19 @@ #include "base/single_thread_task_runner.h" #include "base/thread_task_runner_handle.h" #include "cc/base/unique_notifier.h" -#include "cc/resources/bitmap_tile_task_worker_pool.h" -#include "cc/resources/gpu_rasterizer.h" -#include "cc/resources/gpu_tile_task_worker_pool.h" -#include "cc/resources/one_copy_tile_task_worker_pool.h" -#include "cc/resources/picture_pile.h" -#include "cc/resources/picture_pile_impl.h" -#include "cc/resources/pixel_buffer_tile_task_worker_pool.h" -#include "cc/resources/raster_buffer.h" +#include "cc/playback/picture_pile.h" +#include "cc/playback/picture_pile_impl.h" +#include "cc/raster/bitmap_tile_task_worker_pool.h" +#include "cc/raster/gpu_rasterizer.h" +#include "cc/raster/gpu_tile_task_worker_pool.h" +#include "cc/raster/one_copy_tile_task_worker_pool.h" +#include "cc/raster/pixel_buffer_tile_task_worker_pool.h" +#include "cc/raster/raster_buffer.h" +#include "cc/raster/tile_task_runner.h" +#include "cc/raster/zero_copy_tile_task_worker_pool.h" #include "cc/resources/resource_pool.h" #include "cc/resources/resource_provider.h" #include "cc/resources/scoped_resource.h" -#include "cc/resources/tile_task_runner.h" -#include "cc/resources/zero_copy_tile_task_worker_pool.h" #include "cc/test/fake_output_surface.h" #include "cc/test/fake_output_surface_client.h" #include "cc/test/fake_picture_pile_impl.h" diff --git a/cc/resources/zero_copy_tile_task_worker_pool.cc b/cc/raster/zero_copy_tile_task_worker_pool.cc similarity index 98% rename from cc/resources/zero_copy_tile_task_worker_pool.cc rename to cc/raster/zero_copy_tile_task_worker_pool.cc index 17acf6f9e51c7..5a1dc23058b59 100644 --- a/cc/resources/zero_copy_tile_task_worker_pool.cc +++ b/cc/raster/zero_copy_tile_task_worker_pool.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/zero_copy_tile_task_worker_pool.h" +#include "cc/raster/zero_copy_tile_task_worker_pool.h" #include @@ -10,7 +10,7 @@ #include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event_argument.h" #include "cc/debug/traced_value.h" -#include "cc/resources/raster_buffer.h" +#include "cc/raster/raster_buffer.h" #include "cc/resources/resource.h" #include "ui/gfx/gpu_memory_buffer.h" diff --git a/cc/resources/zero_copy_tile_task_worker_pool.h b/cc/raster/zero_copy_tile_task_worker_pool.h similarity index 89% rename from cc/resources/zero_copy_tile_task_worker_pool.h rename to cc/raster/zero_copy_tile_task_worker_pool.h index b64e0f59c1a47..193eeda373dbb 100644 --- a/cc/resources/zero_copy_tile_task_worker_pool.h +++ b/cc/raster/zero_copy_tile_task_worker_pool.h @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_ZERO_COPY_TILE_TASK_WORKER_POOL_H_ -#define CC_RESOURCES_ZERO_COPY_TILE_TASK_WORKER_POOL_H_ +#ifndef CC_RASTER_ZERO_COPY_TILE_TASK_WORKER_POOL_H_ +#define CC_RASTER_ZERO_COPY_TILE_TASK_WORKER_POOL_H_ #include "base/memory/weak_ptr.h" #include "base/values.h" -#include "cc/resources/tile_task_runner.h" -#include "cc/resources/tile_task_worker_pool.h" +#include "cc/raster/tile_task_runner.h" +#include "cc/raster/tile_task_worker_pool.h" namespace base { namespace trace_event { @@ -78,4 +78,4 @@ class CC_EXPORT ZeroCopyTileTaskWorkerPool : public TileTaskWorkerPool, } // namespace cc -#endif // CC_RESOURCES_ZERO_COPY_TILE_TASK_WORKER_POOL_H_ +#endif // CC_RASTER_ZERO_COPY_TILE_TASK_WORKER_POOL_H_ diff --git a/cc/scheduler/scheduler_state_machine.cc b/cc/scheduler/scheduler_state_machine.cc index 2fbeca2d8a992..e303d3ab48afc 100644 --- a/cc/scheduler/scheduler_state_machine.cc +++ b/cc/scheduler/scheduler_state_machine.cc @@ -850,6 +850,12 @@ void SchedulerStateMachine::OnBeginImplFrameDeadline() { // Clear funnels for any actions we perform during the deadline. request_swap_funnel_ = false; + + // Allow one PrepareTiles per draw for synchronous compositor. + if (settings_.using_synchronous_renderer_compositor) { + if (prepare_tiles_funnel_ > 0) + prepare_tiles_funnel_--; + } } void SchedulerStateMachine::OnBeginImplFrameIdle() { diff --git a/cc/scheduler/scheduler_unittest.cc b/cc/scheduler/scheduler_unittest.cc index 2f878fdcdbfa9..d2b12d768a533 100644 --- a/cc/scheduler/scheduler_unittest.cc +++ b/cc/scheduler/scheduler_unittest.cc @@ -2616,6 +2616,70 @@ TEST_F(SchedulerTest, SynchronousCompositorDoubleCommitWithoutDraw) { client_->Reset(); } +class SchedulerClientSetNeedsPrepareTilesOnDraw : public FakeSchedulerClient { + public: + SchedulerClientSetNeedsPrepareTilesOnDraw() : FakeSchedulerClient() {} + + protected: + DrawResult ScheduledActionDrawAndSwapIfPossible() override { + scheduler_->SetNeedsPrepareTiles(); + return FakeSchedulerClient::ScheduledActionDrawAndSwapIfPossible(); + } + + void ScheduledActionPrepareTiles() override { + FakeSchedulerClient::ScheduledActionPrepareTiles(); + scheduler_->DidPrepareTiles(); + } +}; + +TEST_F(SchedulerTest, SynchronousCompositorPrepareTilesOnDraw) { + scheduler_settings_.using_synchronous_renderer_compositor = true; + scheduler_settings_.use_external_begin_frame_source = true; + scheduler_settings_.impl_side_painting = true; + + scoped_ptr client = + make_scoped_ptr(new SchedulerClientSetNeedsPrepareTilesOnDraw); + SetUpScheduler(client.Pass(), true); + + scheduler_->SetNeedsRedraw(); + EXPECT_SINGLE_ACTION("SetNeedsBeginFrames(true)", client_); + client_->Reset(); + + // Next vsync. + EXPECT_SCOPED(AdvanceFrame()); + EXPECT_ACTION("WillBeginImplFrame", client_, 0, 3); + EXPECT_ACTION("ScheduledActionAnimate", client_, 1, 3); + EXPECT_ACTION("ScheduledActionInvalidateOutputSurface", client_, 2, 3); + client_->Reset(); + + // Android onDraw. + scheduler_->SetNeedsRedraw(); + scheduler_->OnDrawForOutputSurface(); + EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 2); + EXPECT_ACTION("ScheduledActionPrepareTiles", client_, 1, 2); + EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); + EXPECT_FALSE(scheduler_->PrepareTilesPending()); + client_->Reset(); + + // Android onDraw. + scheduler_->SetNeedsRedraw(); + scheduler_->OnDrawForOutputSurface(); + EXPECT_ACTION("ScheduledActionDrawAndSwapIfPossible", client_, 0, 2); + EXPECT_ACTION("ScheduledActionPrepareTiles", client_, 1, 2); + EXPECT_FALSE(scheduler_->BeginImplFrameDeadlinePending()); + EXPECT_FALSE(scheduler_->PrepareTilesPending()); + client_->Reset(); + + // Next vsync. + EXPECT_SCOPED(AdvanceFrame()); + EXPECT_FALSE(scheduler_->PrepareTilesPending()); + EXPECT_ACTION("WillBeginImplFrame", client_, 0, 3); + EXPECT_ACTION("SetNeedsBeginFrames(false)", client_, 1, 3); + EXPECT_ACTION("SendBeginMainFrameNotExpectedSoon", client_, 2, 3); + EXPECT_FALSE(client_->needs_begin_frames()); + client_->Reset(); +} + TEST_F(SchedulerTest, AuthoritativeVSyncInterval) { SetUpScheduler(true); diff --git a/cc/scheduler/video_frame_controller.h b/cc/scheduler/video_frame_controller.h index dee7df530a83c..0307cd5e40230 100644 --- a/cc/scheduler/video_frame_controller.h +++ b/cc/scheduler/video_frame_controller.h @@ -26,6 +26,11 @@ class CC_EXPORT VideoFrameController { public: virtual void OnBeginFrame(const BeginFrameArgs& args) = 0; + // Called upon completion of LayerTreeHostImpl::DidDrawAllLayers(), regardless + // of whether the controller issued a SetNeedsRedraw(). May be used to + // determine when SetNeedsRedraw() is called but the draw is aborted. + virtual void DidDrawFrame() = 0; + protected: virtual ~VideoFrameController() {} }; diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc index a6091f14f86e1..e2b817283933a 100644 --- a/cc/surfaces/display.cc +++ b/cc/surfaces/display.cc @@ -13,7 +13,7 @@ #include "cc/output/gl_renderer.h" #include "cc/output/renderer_settings.h" #include "cc/output/software_renderer.h" -#include "cc/resources/texture_mailbox_deleter.h" +#include "cc/output/texture_mailbox_deleter.h" #include "cc/surfaces/display_client.h" #include "cc/surfaces/surface.h" #include "cc/surfaces/surface_aggregator.h" diff --git a/cc/test/fake_content_layer_client.cc b/cc/test/fake_content_layer_client.cc index dce5e6ecba57d..5d949bf395c46 100644 --- a/cc/test/fake_content_layer_client.cc +++ b/cc/test/fake_content_layer_client.cc @@ -4,9 +4,9 @@ #include "cc/test/fake_content_layer_client.h" -#include "cc/resources/clip_display_item.h" -#include "cc/resources/drawing_display_item.h" -#include "cc/resources/transform_display_item.h" +#include "cc/playback/clip_display_item.h" +#include "cc/playback/drawing_display_item.h" +#include "cc/playback/transform_display_item.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkPictureRecorder.h" #include "ui/gfx/skia_util.h" diff --git a/cc/test/fake_display_list_recording_source.h b/cc/test/fake_display_list_recording_source.h index d168cd63ae0d6..d4506adf0e148 100644 --- a/cc/test/fake_display_list_recording_source.h +++ b/cc/test/fake_display_list_recording_source.h @@ -5,7 +5,7 @@ #ifndef CC_TEST_FAKE_DISPLAY_LIST_RECORDING_SOURCE_H_ #define CC_TEST_FAKE_DISPLAY_LIST_RECORDING_SOURCE_H_ -#include "cc/resources/display_list_recording_source.h" +#include "cc/playback/display_list_recording_source.h" #include "cc/test/fake_content_layer_client.h" #include "cc/test/impl_side_painting_settings.h" diff --git a/cc/test/fake_picture_layer.h b/cc/test/fake_picture_layer.h index d1011554ac09c..2421fee0d5983 100644 --- a/cc/test/fake_picture_layer.h +++ b/cc/test/fake_picture_layer.h @@ -8,7 +8,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" #include "cc/layers/picture_layer.h" -#include "cc/resources/recording_source.h" +#include "cc/playback/recording_source.h" namespace cc { class FakePictureLayer : public PictureLayer { diff --git a/cc/test/fake_picture_layer_impl.cc b/cc/test/fake_picture_layer_impl.cc index 81ae6a90c72ee..11d13204682f8 100644 --- a/cc/test/fake_picture_layer_impl.cc +++ b/cc/test/fake_picture_layer_impl.cc @@ -5,7 +5,7 @@ #include "cc/test/fake_picture_layer_impl.h" #include -#include "cc/resources/tile.h" +#include "cc/tiles/tile.h" #include "cc/trees/layer_tree_impl.h" namespace cc { diff --git a/cc/test/fake_picture_layer_tiling_client.h b/cc/test/fake_picture_layer_tiling_client.h index 94a600e415cf2..82a6ff87619be 100644 --- a/cc/test/fake_picture_layer_tiling_client.h +++ b/cc/test/fake_picture_layer_tiling_client.h @@ -5,11 +5,11 @@ #ifndef CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ #define CC_TEST_FAKE_PICTURE_LAYER_TILING_CLIENT_H_ -#include "cc/resources/picture_layer_tiling.h" -#include "cc/resources/picture_pile_impl.h" -#include "cc/resources/tile.h" -#include "cc/resources/tile_manager.h" +#include "cc/playback/picture_pile_impl.h" #include "cc/test/fake_tile_manager_client.h" +#include "cc/tiles/picture_layer_tiling.h" +#include "cc/tiles/tile.h" +#include "cc/tiles/tile_manager.h" #include "ui/gfx/geometry/rect.h" namespace cc { diff --git a/cc/test/fake_picture_pile.h b/cc/test/fake_picture_pile.h index e6f81dd3f94c8..32d09973156f2 100644 --- a/cc/test/fake_picture_pile.h +++ b/cc/test/fake_picture_pile.h @@ -5,7 +5,7 @@ #ifndef CC_TEST_FAKE_PICTURE_PILE_H_ #define CC_TEST_FAKE_PICTURE_PILE_H_ -#include "cc/resources/picture_pile.h" +#include "cc/playback/picture_pile.h" #include "cc/test/fake_content_layer_client.h" #include "cc/test/impl_side_painting_settings.h" diff --git a/cc/test/fake_picture_pile_impl.cc b/cc/test/fake_picture_pile_impl.cc index 172a434b43c17..061779f3a2d96 100644 --- a/cc/test/fake_picture_pile_impl.cc +++ b/cc/test/fake_picture_pile_impl.cc @@ -9,7 +9,7 @@ #include #include "base/synchronization/waitable_event.h" -#include "cc/resources/picture_pile.h" +#include "cc/playback/picture_pile.h" #include "cc/test/impl_side_painting_settings.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/cc/test/fake_picture_pile_impl.h b/cc/test/fake_picture_pile_impl.h index a21509a080085..f36a29866cfe1 100644 --- a/cc/test/fake_picture_pile_impl.h +++ b/cc/test/fake_picture_pile_impl.h @@ -6,7 +6,7 @@ #define CC_TEST_FAKE_PICTURE_PILE_IMPL_H_ #include "base/memory/ref_counted.h" -#include "cc/resources/picture_pile_impl.h" +#include "cc/playback/picture_pile_impl.h" #include "cc/test/fake_picture_pile.h" namespace base { diff --git a/cc/test/fake_tile_manager.cc b/cc/test/fake_tile_manager.cc index 47634eeae7a93..659a9068b22f3 100644 --- a/cc/test/fake_tile_manager.cc +++ b/cc/test/fake_tile_manager.cc @@ -9,8 +9,8 @@ #include "base/lazy_instance.h" #include "base/thread_task_runner_handle.h" -#include "cc/resources/raster_buffer.h" -#include "cc/resources/tile_task_runner.h" +#include "cc/raster/raster_buffer.h" +#include "cc/raster/tile_task_runner.h" namespace cc { diff --git a/cc/test/fake_tile_manager.h b/cc/test/fake_tile_manager.h index 84f794e096c7b..d432c68381881 100644 --- a/cc/test/fake_tile_manager.h +++ b/cc/test/fake_tile_manager.h @@ -8,7 +8,7 @@ #include #include -#include "cc/resources/tile_manager.h" +#include "cc/tiles/tile_manager.h" namespace cc { diff --git a/cc/test/fake_tile_manager_client.h b/cc/test/fake_tile_manager_client.h index 3afe2f587f6b5..56c89ce0ccca5 100644 --- a/cc/test/fake_tile_manager_client.h +++ b/cc/test/fake_tile_manager_client.h @@ -7,7 +7,7 @@ #include -#include "cc/resources/tile_manager.h" +#include "cc/tiles/tile_manager.h" namespace cc { diff --git a/cc/test/fake_video_frame_provider.cc b/cc/test/fake_video_frame_provider.cc index 3f4b40b7612a9..b979b0c95e098 100644 --- a/cc/test/fake_video_frame_provider.cc +++ b/cc/test/fake_video_frame_provider.cc @@ -23,6 +23,10 @@ void FakeVideoFrameProvider::SetVideoFrameProviderClient(Client* client) { client_ = client; } +bool FakeVideoFrameProvider::HasCurrentFrame() { + return frame_; +} + scoped_refptr FakeVideoFrameProvider::GetCurrentFrame() { return frame_; } diff --git a/cc/test/fake_video_frame_provider.h b/cc/test/fake_video_frame_provider.h index 53903c9c25d34..da68d5bad2b9d 100644 --- a/cc/test/fake_video_frame_provider.h +++ b/cc/test/fake_video_frame_provider.h @@ -19,6 +19,7 @@ class FakeVideoFrameProvider : public VideoFrameProvider { void SetVideoFrameProviderClient(Client* client) override; bool UpdateCurrentFrame(base::TimeTicks deadline_min, base::TimeTicks deadline_max) override; + bool HasCurrentFrame() override; scoped_refptr GetCurrentFrame() override; void PutCurrentFrame() override {} diff --git a/cc/test/impl_side_painting_settings.h b/cc/test/impl_side_painting_settings.h index ede84dbe5c4ab..1ea7e7837d778 100644 --- a/cc/test/impl_side_painting_settings.h +++ b/cc/test/impl_side_painting_settings.h @@ -15,9 +15,9 @@ class ImplSidePaintingSettings : public LayerTreeSettings { impl_side_painting = true; } - explicit ImplSidePaintingSettings(float viewport_multiplier) { + explicit ImplSidePaintingSettings(int interest_rect_tiles) { impl_side_painting = true; - tiling_interest_area_viewport_multiplier = viewport_multiplier; + max_tiles_for_interest_area = interest_rect_tiles; } }; diff --git a/cc/test/layer_tree_pixel_resource_test.cc b/cc/test/layer_tree_pixel_resource_test.cc index 025cffd603df0..2890af0891be8 100644 --- a/cc/test/layer_tree_pixel_resource_test.cc +++ b/cc/test/layer_tree_pixel_resource_test.cc @@ -5,14 +5,14 @@ #include "cc/test/layer_tree_pixel_resource_test.h" #include "cc/layers/layer.h" -#include "cc/resources/bitmap_tile_task_worker_pool.h" -#include "cc/resources/gpu_rasterizer.h" -#include "cc/resources/gpu_tile_task_worker_pool.h" -#include "cc/resources/one_copy_tile_task_worker_pool.h" -#include "cc/resources/pixel_buffer_tile_task_worker_pool.h" +#include "cc/raster/bitmap_tile_task_worker_pool.h" +#include "cc/raster/gpu_rasterizer.h" +#include "cc/raster/gpu_tile_task_worker_pool.h" +#include "cc/raster/one_copy_tile_task_worker_pool.h" +#include "cc/raster/pixel_buffer_tile_task_worker_pool.h" +#include "cc/raster/tile_task_worker_pool.h" +#include "cc/raster/zero_copy_tile_task_worker_pool.h" #include "cc/resources/resource_pool.h" -#include "cc/resources/tile_task_worker_pool.h" -#include "cc/resources/zero_copy_tile_task_worker_pool.h" #include "cc/test/fake_output_surface.h" #include "gpu/GLES2/gl2extchromium.h" diff --git a/cc/test/pixel_test.cc b/cc/test/pixel_test.cc index 2c3fb653ad0a9..d9e2d1e1f7e25 100644 --- a/cc/test/pixel_test.cc +++ b/cc/test/pixel_test.cc @@ -15,9 +15,9 @@ #include "cc/output/gl_renderer.h" #include "cc/output/output_surface_client.h" #include "cc/output/software_renderer.h" +#include "cc/output/texture_mailbox_deleter.h" +#include "cc/raster/tile_task_worker_pool.h" #include "cc/resources/resource_provider.h" -#include "cc/resources/texture_mailbox_deleter.h" -#include "cc/resources/tile_task_worker_pool.h" #include "cc/test/fake_output_surface_client.h" #include "cc/test/paths.h" #include "cc/test/pixel_test_output_surface.h" diff --git a/cc/test/skia_common.cc b/cc/test/skia_common.cc index ef61e217fc52a..c0b667146854e 100644 --- a/cc/test/skia_common.cc +++ b/cc/test/skia_common.cc @@ -4,8 +4,8 @@ #include "cc/test/skia_common.h" -#include "cc/resources/display_item_list.h" -#include "cc/resources/picture.h" +#include "cc/playback/display_item_list.h" +#include "cc/playback/picture.h" #include "skia/ext/refptr.h" #include "third_party/skia/include/core/SkCanvas.h" #include "ui/gfx/geometry/rect.h" diff --git a/cc/test/test_task_graph_runner.h b/cc/test/test_task_graph_runner.h index 8314e113afb52..4588a2ab66b84 100644 --- a/cc/test/test_task_graph_runner.h +++ b/cc/test/test_task_graph_runner.h @@ -6,7 +6,7 @@ #define CC_TEST_TEST_TASK_GRAPH_RUNNER_H_ #include "base/threading/simple_thread.h" -#include "cc/resources/task_graph_runner.h" +#include "cc/raster/task_graph_runner.h" namespace cc { diff --git a/cc/test/test_tile_priorities.h b/cc/test/test_tile_priorities.h index 60738e43b36ed..c30b2c4abbdac 100644 --- a/cc/test/test_tile_priorities.h +++ b/cc/test/test_tile_priorities.h @@ -5,7 +5,7 @@ #ifndef CC_TEST_TEST_TILE_PRIORITIES_H_ #define CC_TEST_TEST_TILE_PRIORITIES_H_ -#include "cc/resources/tile_priority.h" +#include "cc/tiles/tile_priority.h" namespace cc { diff --git a/cc/resources/eviction_tile_priority_queue.cc b/cc/tiles/eviction_tile_priority_queue.cc similarity index 99% rename from cc/resources/eviction_tile_priority_queue.cc rename to cc/tiles/eviction_tile_priority_queue.cc index 3a4cb832e4107..fb27448c2bee3 100644 --- a/cc/resources/eviction_tile_priority_queue.cc +++ b/cc/tiles/eviction_tile_priority_queue.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/eviction_tile_priority_queue.h" +#include "cc/tiles/eviction_tile_priority_queue.h" namespace cc { diff --git a/cc/resources/eviction_tile_priority_queue.h b/cc/tiles/eviction_tile_priority_queue.h similarity index 80% rename from cc/resources/eviction_tile_priority_queue.h rename to cc/tiles/eviction_tile_priority_queue.h index 06118d987d99d..e76102605085f 100644 --- a/cc/resources/eviction_tile_priority_queue.h +++ b/cc/tiles/eviction_tile_priority_queue.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_ -#define CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_ +#ifndef CC_TILES_EVICTION_TILE_PRIORITY_QUEUE_H_ +#define CC_TILES_EVICTION_TILE_PRIORITY_QUEUE_H_ #include #include @@ -11,8 +11,8 @@ #include "cc/base/cc_export.h" #include "cc/layers/picture_layer_impl.h" -#include "cc/resources/tile_priority.h" -#include "cc/resources/tiling_set_eviction_queue.h" +#include "cc/tiles/tile_priority.h" +#include "cc/tiles/tiling_set_eviction_queue.h" namespace cc { class PrioritizedTile; @@ -43,4 +43,4 @@ class CC_EXPORT EvictionTilePriorityQueue { } // namespace cc -#endif // CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_ +#endif // CC_TILES_EVICTION_TILE_PRIORITY_QUEUE_H_ diff --git a/cc/resources/layer_tiling_data.cc b/cc/tiles/layer_tiling_data.cc similarity index 98% rename from cc/resources/layer_tiling_data.cc rename to cc/tiles/layer_tiling_data.cc index 63b003628c346..494ded8456d63 100644 --- a/cc/resources/layer_tiling_data.cc +++ b/cc/tiles/layer_tiling_data.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/layer_tiling_data.h" +#include "cc/tiles/layer_tiling_data.h" #include diff --git a/cc/resources/layer_tiling_data.h b/cc/tiles/layer_tiling_data.h similarity index 95% rename from cc/resources/layer_tiling_data.h rename to cc/tiles/layer_tiling_data.h index 526da6faf1e19..5e944a569bf2a 100644 --- a/cc/resources/layer_tiling_data.h +++ b/cc/tiles/layer_tiling_data.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_LAYER_TILING_DATA_H_ -#define CC_RESOURCES_LAYER_TILING_DATA_H_ +#ifndef CC_TILES_LAYER_TILING_DATA_H_ +#define CC_TILES_LAYER_TILING_DATA_H_ #include @@ -99,4 +99,4 @@ class CC_EXPORT LayerTilingData { } // namespace cc -#endif // CC_RESOURCES_LAYER_TILING_DATA_H_ +#endif // CC_TILES_LAYER_TILING_DATA_H_ diff --git a/cc/resources/picture_layer_tiling.cc b/cc/tiles/picture_layer_tiling.cc similarity index 97% rename from cc/resources/picture_layer_tiling.cc rename to cc/tiles/picture_layer_tiling.cc index b90d28d19ad4d..c585e559e8b29 100644 --- a/cc/resources/picture_layer_tiling.cc +++ b/cc/tiles/picture_layer_tiling.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/picture_layer_tiling.h" +#include "cc/tiles/picture_layer_tiling.h" #include #include @@ -13,10 +13,10 @@ #include "base/trace_event/trace_event.h" #include "base/trace_event/trace_event_argument.h" #include "cc/base/math_util.h" -#include "cc/resources/prioritized_tile.h" -#include "cc/resources/raster_source.h" -#include "cc/resources/tile.h" -#include "cc/resources/tile_priority.h" +#include "cc/playback/raster_source.h" +#include "cc/tiles/prioritized_tile.h" +#include "cc/tiles/tile.h" +#include "cc/tiles/tile_priority.h" #include "ui/gfx/geometry/point_conversions.h" #include "ui/gfx/geometry/rect_conversions.h" #include "ui/gfx/geometry/safe_integer_conversions.h" @@ -35,12 +35,12 @@ scoped_ptr PictureLayerTiling::Create( float contents_scale, scoped_refptr raster_source, PictureLayerTilingClient* client, - float tiling_interest_area_viewport_multiplier, + size_t max_tiles_for_interest_area, float skewport_target_time_in_seconds, int skewport_extrapolation_limit_in_content_pixels) { return make_scoped_ptr(new PictureLayerTiling( - tree, contents_scale, raster_source, client, - tiling_interest_area_viewport_multiplier, skewport_target_time_in_seconds, + tree, contents_scale, raster_source, client, max_tiles_for_interest_area, + skewport_target_time_in_seconds, skewport_extrapolation_limit_in_content_pixels)); } @@ -49,11 +49,10 @@ PictureLayerTiling::PictureLayerTiling( float contents_scale, scoped_refptr raster_source, PictureLayerTilingClient* client, - float tiling_interest_area_viewport_multiplier, + size_t max_tiles_for_interest_area, float skewport_target_time_in_seconds, int skewport_extrapolation_limit_in_content_pixels) - : tiling_interest_area_viewport_multiplier_( - tiling_interest_area_viewport_multiplier), + : max_tiles_for_interest_area_(max_tiles_for_interest_area), skewport_target_time_in_seconds_(skewport_target_time_in_seconds), skewport_extrapolation_limit_in_content_pixels_( skewport_extrapolation_limit_in_content_pixels), @@ -552,6 +551,13 @@ gfx::Rect PictureLayerTiling::ComputeSkewport( // union in case intersecting would have left the empty rect. skewport.Intersect(max_skewport); + // Due to limits in int's representation, it is possible that the two + // operations above (union and intersect) result in an empty skewport. To + // avoid any unpleasant situations like that, union the visible rect again to + // ensure that skewport.Contains(visible_rect_in_content_space) is always + // true. + skewport.Union(visible_rect_in_content_space); + return skewport; } @@ -566,6 +572,7 @@ bool PictureLayerTiling::ComputeTilePriorityRects( DCHECK_NE(current_frame_time_in_seconds, 0.0); return false; } + gfx::Rect visible_rect_in_content_space = gfx::ScaleToEnclosingRect(viewport_in_layer_space, contents_scale_); @@ -582,9 +589,9 @@ bool PictureLayerTiling::ComputeTilePriorityRects( DCHECK(skewport.Contains(visible_rect_in_content_space)); // Calculate the eventually/live tiles rect. - int64 eventually_rect_area = tiling_interest_area_viewport_multiplier_ * - visible_rect_in_content_space.width() * - visible_rect_in_content_space.height(); + gfx::Size tile_size = tiling_data_.max_texture_size(); + int64 eventually_rect_area = + max_tiles_for_interest_area_ * tile_size.width() * tile_size.height(); gfx::Rect eventually_rect = ExpandRectEquallyToAreaBoundedBy(visible_rect_in_content_space, diff --git a/cc/resources/picture_layer_tiling.h b/cc/tiles/picture_layer_tiling.h similarity index 97% rename from cc/resources/picture_layer_tiling.h rename to cc/tiles/picture_layer_tiling.h index 8ae68e1d67ab9..33a81879f201d 100644 --- a/cc/resources/picture_layer_tiling.h +++ b/cc/tiles/picture_layer_tiling.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_ -#define CC_RESOURCES_PICTURE_LAYER_TILING_H_ +#ifndef CC_TILES_PICTURE_LAYER_TILING_H_ +#define CC_TILES_PICTURE_LAYER_TILING_H_ #include #include @@ -15,8 +15,8 @@ #include "cc/base/cc_export.h" #include "cc/base/region.h" #include "cc/base/tiling_data.h" -#include "cc/resources/tile.h" -#include "cc/resources/tile_priority.h" +#include "cc/tiles/tile.h" +#include "cc/tiles/tile_priority.h" #include "cc/trees/occlusion.h" #include "ui/gfx/geometry/rect.h" @@ -69,7 +69,7 @@ class CC_EXPORT PictureLayerTiling { float contents_scale, scoped_refptr raster_source, PictureLayerTilingClient* client, - float tiling_interest_area_viewport_multiplier, + size_t max_tiles_for_interest_area, float skewport_target_time_in_seconds, int skewport_extrapolation_limit_in_content_pixels); @@ -237,7 +237,7 @@ class CC_EXPORT PictureLayerTiling { float contents_scale, scoped_refptr raster_source, PictureLayerTilingClient* client, - float tiling_interest_area_viewport_multiplier, + size_t max_tiles_for_interest_area, float skewport_target_time_in_seconds, int skewport_extrapolation_limit_in_content_pixels); void SetLiveTilesRect(const gfx::Rect& live_tiles_rect); @@ -324,7 +324,7 @@ class CC_EXPORT PictureLayerTiling { } void RemoveTilesInRegion(const Region& layer_region, bool recreate_tiles); - const float tiling_interest_area_viewport_multiplier_; + const size_t max_tiles_for_interest_area_; const float skewport_target_time_in_seconds_; const int skewport_extrapolation_limit_in_content_pixels_; @@ -368,4 +368,4 @@ class CC_EXPORT PictureLayerTiling { } // namespace cc -#endif // CC_RESOURCES_PICTURE_LAYER_TILING_H_ +#endif // CC_TILES_PICTURE_LAYER_TILING_H_ diff --git a/cc/resources/picture_layer_tiling_perftest.cc b/cc/tiles/picture_layer_tiling_perftest.cc similarity index 98% rename from cc/resources/picture_layer_tiling_perftest.cc rename to cc/tiles/picture_layer_tiling_perftest.cc index dd7d0e6c3017d..0aae512030e24 100644 --- a/cc/resources/picture_layer_tiling_perftest.cc +++ b/cc/tiles/picture_layer_tiling_perftest.cc @@ -3,7 +3,6 @@ // found in the LICENSE file. #include "cc/debug/lap_timer.h" -#include "cc/resources/picture_layer_tiling.h" #include "cc/resources/resource_provider.h" #include "cc/resources/scoped_resource.h" #include "cc/test/fake_output_surface.h" @@ -12,6 +11,7 @@ #include "cc/test/fake_picture_pile_impl.h" #include "cc/test/test_context_provider.h" #include "cc/test/test_shared_bitmap_manager.h" +#include "cc/tiles/picture_layer_tiling.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/perf/perf_test.h" @@ -52,7 +52,7 @@ class PictureLayerTilingPerfTest : public testing::Test { gfx::Size(256 * 50, 256 * 50)); picture_layer_tiling_ = PictureLayerTiling::Create( PENDING_TREE, 1.f, pile, &picture_layer_tiling_client_, - defaults.tiling_interest_area_viewport_multiplier, + defaults.max_tiles_for_interest_area, defaults.skewport_target_time_in_seconds, defaults.skewport_extrapolation_limit_in_content_pixels); picture_layer_tiling_->CreateAllTilesForTesting(); diff --git a/cc/resources/picture_layer_tiling_set.cc b/cc/tiles/picture_layer_tiling_set.cc similarity index 97% rename from cc/resources/picture_layer_tiling_set.cc rename to cc/tiles/picture_layer_tiling_set.cc index ed97a0577aef9..b794b137ff08a 100644 --- a/cc/resources/picture_layer_tiling_set.cc +++ b/cc/tiles/picture_layer_tiling_set.cc @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/picture_layer_tiling_set.h" +#include "cc/tiles/picture_layer_tiling_set.h" #include #include #include -#include "cc/resources/raster_source.h" +#include "cc/playback/raster_source.h" namespace cc { @@ -33,11 +33,11 @@ inline float LargerRatio(float float1, float float2) { scoped_ptr PictureLayerTilingSet::Create( WhichTree tree, PictureLayerTilingClient* client, - float tiling_interest_area_viewport_multiplier, + size_t max_tiles_for_interest_area, float skewport_target_time_in_seconds, int skewport_extrapolation_limit_in_content_pixels) { return make_scoped_ptr(new PictureLayerTilingSet( - tree, client, tiling_interest_area_viewport_multiplier, + tree, client, max_tiles_for_interest_area, skewport_target_time_in_seconds, skewport_extrapolation_limit_in_content_pixels)); } @@ -45,11 +45,10 @@ scoped_ptr PictureLayerTilingSet::Create( PictureLayerTilingSet::PictureLayerTilingSet( WhichTree tree, PictureLayerTilingClient* client, - float tiling_interest_area_viewport_multiplier, + size_t max_tiles_for_interest_area, float skewport_target_time_in_seconds, int skewport_extrapolation_limit_in_content_pixels) - : tiling_interest_area_viewport_multiplier_( - tiling_interest_area_viewport_multiplier), + : max_tiles_for_interest_area_(max_tiles_for_interest_area), skewport_target_time_in_seconds_(skewport_target_time_in_seconds), skewport_extrapolation_limit_in_content_pixels_( skewport_extrapolation_limit_in_content_pixels), @@ -79,8 +78,7 @@ void PictureLayerTilingSet::CopyTilingsAndPropertiesFromPendingTwin( if (!this_tiling) { scoped_ptr new_tiling = PictureLayerTiling::Create( tree_, contents_scale, raster_source, client_, - tiling_interest_area_viewport_multiplier_, - skewport_target_time_in_seconds_, + max_tiles_for_interest_area_, skewport_target_time_in_seconds_, skewport_extrapolation_limit_in_content_pixels_); tilings_.push_back(new_tiling.Pass()); this_tiling = tilings_.back(); @@ -265,8 +263,7 @@ PictureLayerTiling* PictureLayerTilingSet::AddTiling( tilings_.push_back(PictureLayerTiling::Create( tree_, contents_scale, raster_source, client_, - tiling_interest_area_viewport_multiplier_, - skewport_target_time_in_seconds_, + max_tiles_for_interest_area_, skewport_target_time_in_seconds_, skewport_extrapolation_limit_in_content_pixels_)); PictureLayerTiling* appended = tilings_.back(); diff --git a/cc/resources/picture_layer_tiling_set.h b/cc/tiles/picture_layer_tiling_set.h similarity index 94% rename from cc/resources/picture_layer_tiling_set.h rename to cc/tiles/picture_layer_tiling_set.h index c46dc6391515f..2347d53798d5e 100644 --- a/cc/resources/picture_layer_tiling_set.h +++ b/cc/tiles/picture_layer_tiling_set.h @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ -#define CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ +#ifndef CC_TILES_PICTURE_LAYER_TILING_SET_H_ +#define CC_TILES_PICTURE_LAYER_TILING_SET_H_ #include #include #include "cc/base/region.h" #include "cc/base/scoped_ptr_vector.h" -#include "cc/resources/picture_layer_tiling.h" +#include "cc/tiles/picture_layer_tiling.h" #include "ui/gfx/geometry/size.h" namespace base { @@ -40,7 +40,7 @@ class CC_EXPORT PictureLayerTilingSet { static scoped_ptr Create( WhichTree tree, PictureLayerTilingClient* client, - float tiling_interest_area_viewport_multiplier, + size_t max_tiles_for_interest_area, float skewport_target_time_in_seconds, int skewport_extrapolation_limit_in_content); @@ -176,7 +176,7 @@ class CC_EXPORT PictureLayerTilingSet { explicit PictureLayerTilingSet( WhichTree tree, PictureLayerTilingClient* client, - float tiling_interest_area_viewport_multiplier, + size_t max_tiles_for_interest_area, float skewport_target_time_in_seconds, int skewport_extrapolation_limit_in_content_pixels); @@ -191,7 +191,7 @@ class CC_EXPORT PictureLayerTilingSet { ScopedPtrVector tilings_; - const float tiling_interest_area_viewport_multiplier_; + const size_t max_tiles_for_interest_area_; const float skewport_target_time_in_seconds_; const int skewport_extrapolation_limit_in_content_pixels_; WhichTree tree_; @@ -203,4 +203,4 @@ class CC_EXPORT PictureLayerTilingSet { } // namespace cc -#endif // CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_ +#endif // CC_TILES_PICTURE_LAYER_TILING_SET_H_ diff --git a/cc/resources/picture_layer_tiling_set_unittest.cc b/cc/tiles/picture_layer_tiling_set_unittest.cc similarity index 99% rename from cc/resources/picture_layer_tiling_set_unittest.cc rename to cc/tiles/picture_layer_tiling_set_unittest.cc index 00e3789cf18a2..c04870e3d16f4 100644 --- a/cc/resources/picture_layer_tiling_set_unittest.cc +++ b/cc/tiles/picture_layer_tiling_set_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/picture_layer_tiling_set.h" +#include "cc/tiles/picture_layer_tiling_set.h" #include #include @@ -23,7 +23,7 @@ scoped_ptr CreateTilingSet( PictureLayerTilingClient* client) { LayerTreeSettings defaults; return PictureLayerTilingSet::Create( - ACTIVE_TREE, client, defaults.tiling_interest_area_viewport_multiplier, + ACTIVE_TREE, client, defaults.max_tiles_for_interest_area, defaults.skewport_target_time_in_seconds, defaults.skewport_extrapolation_limit_in_content_pixels); } diff --git a/cc/resources/picture_layer_tiling_unittest.cc b/cc/tiles/picture_layer_tiling_unittest.cc similarity index 98% rename from cc/resources/picture_layer_tiling_unittest.cc rename to cc/tiles/picture_layer_tiling_unittest.cc index 659f52a13ddb4..e19f9303014c9 100644 --- a/cc/resources/picture_layer_tiling_unittest.cc +++ b/cc/tiles/picture_layer_tiling_unittest.cc @@ -6,14 +6,14 @@ #include #include "cc/base/math_util.h" -#include "cc/resources/picture_layer_tiling.h" -#include "cc/resources/picture_layer_tiling_set.h" #include "cc/test/fake_output_surface.h" #include "cc/test/fake_output_surface_client.h" #include "cc/test/fake_picture_layer_tiling_client.h" #include "cc/test/fake_picture_pile_impl.h" #include "cc/test/test_context_provider.h" #include "cc/test/test_shared_bitmap_manager.h" +#include "cc/tiles/picture_layer_tiling.h" +#include "cc/tiles/picture_layer_tiling_set.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/geometry/quad_f.h" #include "ui/gfx/geometry/rect_conversions.h" @@ -48,7 +48,7 @@ class TestablePictureLayerTiling : public PictureLayerTiling { const LayerTreeSettings& settings) { return make_scoped_ptr(new TestablePictureLayerTiling( tree, contents_scale, raster_source, client, - settings.tiling_interest_area_viewport_multiplier, + settings.max_tiles_for_interest_area, settings.skewport_target_time_in_seconds, settings.skewport_extrapolation_limit_in_content_pixels)); } @@ -63,14 +63,14 @@ class TestablePictureLayerTiling : public PictureLayerTiling { float contents_scale, scoped_refptr raster_source, PictureLayerTilingClient* client, - float tiling_interest_area_viewport_multiplier, + size_t max_tiles_for_interest_area, float skewport_target_time, int skewport_extrapolation_limit) : PictureLayerTiling(tree, contents_scale, raster_source, client, - tiling_interest_area_viewport_multiplier, + max_tiles_for_interest_area, skewport_target_time, skewport_extrapolation_limit) {} }; @@ -549,6 +549,7 @@ TEST(PictureLayerTilingTest, SkewportLimits) { client.SetTileSize(gfx::Size(100, 100)); LayerTreeSettings settings; + settings.max_tiles_for_interest_area = 10000; settings.skewport_extrapolation_limit_in_content_pixels = 75; scoped_refptr pile = @@ -629,6 +630,30 @@ TEST(PictureLayerTilingTest, SkewportLimits) { EXPECT_TRUE(move_skewport_far.Contains(gfx::Rect(0, 5000, 100, 100))); } +TEST(PictureLayerTilingTest, ComputeSkewportExtremeCases) { + FakePictureLayerTilingClient client; + + gfx::Size layer_bounds(200, 200); + client.SetTileSize(gfx::Size(100, 100)); + LayerTreeSettings settings; + scoped_refptr pile = + FakePicturePileImpl::CreateFilledPileWithDefaultTileSize(layer_bounds); + scoped_ptr tiling = + TestablePictureLayerTiling::Create(ACTIVE_TREE, 1.0f, pile, &client, + settings); + + gfx::Rect viewport1(-1918, 255860, 4010, 2356); + gfx::Rect viewport2(-7088, -91738, 14212, 8350); + gfx::Rect viewport3(-12730024, -158883296, 24607540, 14454512); + double time = 1.0; + tiling->ComputeTilePriorityRects(viewport1, 1.f, time, Occlusion()); + time += 0.016; + EXPECT_TRUE(tiling->ComputeSkewport(time, viewport2).Contains(viewport2)); + tiling->ComputeTilePriorityRects(viewport2, 1.f, time, Occlusion()); + time += 0.016; + EXPECT_TRUE(tiling->ComputeSkewport(time, viewport3).Contains(viewport3)); +} + TEST(PictureLayerTilingTest, ComputeSkewport) { FakePictureLayerTilingClient client; @@ -767,7 +792,7 @@ TEST(PictureLayerTilingTest, ViewportDistanceWithScale) { client.SetTileSize(gfx::Size(10, 10)); LayerTreeSettings settings; - settings.tiling_interest_area_viewport_multiplier = 10000; + settings.max_tiles_for_interest_area = 10000; // Tiling at 0.25 scale: this should create 47x47 tiles of size 10x10. // The reason is that each tile has a one pixel border, so tile at (1, 2) @@ -1267,7 +1292,7 @@ TEST_F(PictureLayerTilingIteratorTest, gfx::Size layer_bounds(10000, 10000); client_.SetTileSize(gfx::Size(100, 100)); LayerTreeSettings settings; - settings.tiling_interest_area_viewport_multiplier = 1; + settings.max_tiles_for_interest_area = 1; scoped_refptr pile = FakePicturePileImpl::CreateFilledPileWithDefaultTileSize(layer_bounds); @@ -1724,7 +1749,7 @@ TEST(ComputeTilePriorityRectsTest, BasicMotion) { client.SetTileSize(gfx::Size(100, 100)); LayerTreeSettings settings; - settings.tiling_interest_area_viewport_multiplier = 10000; + settings.max_tiles_for_interest_area = 10000; scoped_refptr pile = FakePicturePileImpl::CreateFilledPileWithDefaultTileSize( @@ -1854,6 +1879,7 @@ TEST(PictureLayerTilingTest, RecycledTilesCleared) { active_client.SetTileSize(gfx::Size(100, 100)); LayerTreeSettings settings; + settings.max_tiles_for_interest_area = 10; scoped_refptr pile = FakePicturePileImpl::CreateFilledPileWithDefaultTileSize( @@ -1921,6 +1947,7 @@ TEST(PictureLayerTilingTest, RecycledTilesClearedOnReset) { recycle_client.set_twin_tiling(active_tiling.get()); LayerTreeSettings settings; + settings.max_tiles_for_interest_area = 10; pile = FakePicturePileImpl::CreateFilledPileWithDefaultTileSize( gfx::Size(100, 100)); diff --git a/cc/resources/prioritized_tile.cc b/cc/tiles/prioritized_tile.cc similarity index 92% rename from cc/resources/prioritized_tile.cc rename to cc/tiles/prioritized_tile.cc index c278b2854c153..67f33c9dbc812 100644 --- a/cc/resources/prioritized_tile.cc +++ b/cc/tiles/prioritized_tile.cc @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/prioritized_tile.h" +#include "cc/tiles/prioritized_tile.h" #include "cc/debug/traced_value.h" -#include "cc/resources/picture_layer_tiling.h" +#include "cc/tiles/picture_layer_tiling.h" namespace cc { diff --git a/cc/resources/prioritized_tile.h b/cc/tiles/prioritized_tile.h similarity index 84% rename from cc/resources/prioritized_tile.h rename to cc/tiles/prioritized_tile.h index 3ac09fc37fdcb..6811d903a50da 100644 --- a/cc/resources/prioritized_tile.h +++ b/cc/tiles/prioritized_tile.h @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_PRIORITIZED_TILE_H_ -#define CC_RESOURCES_PRIORITIZED_TILE_H_ +#ifndef CC_TILES_PRIORITIZED_TILE_H_ +#define CC_TILES_PRIORITIZED_TILE_H_ #include "cc/base/cc_export.h" -#include "cc/resources/tile.h" -#include "cc/resources/tile_priority.h" +#include "cc/tiles/tile.h" +#include "cc/tiles/tile_priority.h" namespace cc { class PictureLayerTiling; @@ -43,4 +43,4 @@ class CC_EXPORT PrioritizedTile { } // namespace cc -#endif // CC_RESOURCES_PRIORITIZED_TILE_H_ +#endif // CC_TILES_PRIORITIZED_TILE_H_ diff --git a/cc/resources/raster_tile_priority_queue.cc b/cc/tiles/raster_tile_priority_queue.cc similarity index 85% rename from cc/resources/raster_tile_priority_queue.cc rename to cc/tiles/raster_tile_priority_queue.cc index d53dc9d6ea4c8..afa37555ef6fa 100644 --- a/cc/resources/raster_tile_priority_queue.cc +++ b/cc/tiles/raster_tile_priority_queue.cc @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/raster_tile_priority_queue.h" +#include "cc/tiles/raster_tile_priority_queue.h" -#include "cc/resources/raster_tile_priority_queue_all.h" -#include "cc/resources/raster_tile_priority_queue_required.h" +#include "cc/tiles/raster_tile_priority_queue_all.h" +#include "cc/tiles/raster_tile_priority_queue_required.h" namespace cc { diff --git a/cc/resources/raster_tile_priority_queue.h b/cc/tiles/raster_tile_priority_queue.h similarity index 82% rename from cc/resources/raster_tile_priority_queue.h rename to cc/tiles/raster_tile_priority_queue.h index cd5b450dfa315..e2187d2c627d6 100644 --- a/cc/resources/raster_tile_priority_queue.h +++ b/cc/tiles/raster_tile_priority_queue.h @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_H_ -#define CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_H_ +#ifndef CC_TILES_RASTER_TILE_PRIORITY_QUEUE_H_ +#define CC_TILES_RASTER_TILE_PRIORITY_QUEUE_H_ #include #include "cc/base/cc_export.h" #include "cc/layers/picture_layer_impl.h" -#include "cc/resources/tile_priority.h" +#include "cc/tiles/tile_priority.h" namespace cc { class PrioritizedTile; @@ -39,4 +39,4 @@ class CC_EXPORT RasterTilePriorityQueue { } // namespace cc -#endif // CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_H_ +#endif // CC_TILES_RASTER_TILE_PRIORITY_QUEUE_H_ diff --git a/cc/resources/raster_tile_priority_queue_all.cc b/cc/tiles/raster_tile_priority_queue_all.cc similarity index 98% rename from cc/resources/raster_tile_priority_queue_all.cc rename to cc/tiles/raster_tile_priority_queue_all.cc index 950eb9d7c84fa..8f7bdbf043605 100644 --- a/cc/resources/raster_tile_priority_queue_all.cc +++ b/cc/tiles/raster_tile_priority_queue_all.cc @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/raster_tile_priority_queue_all.h" +#include "cc/tiles/raster_tile_priority_queue_all.h" -#include "cc/resources/tiling_set_raster_queue_all.h" +#include "cc/tiles/tiling_set_raster_queue_all.h" namespace cc { diff --git a/cc/resources/raster_tile_priority_queue_all.h b/cc/tiles/raster_tile_priority_queue_all.h similarity index 78% rename from cc/resources/raster_tile_priority_queue_all.h rename to cc/tiles/raster_tile_priority_queue_all.h index 2cb65cc3a57df..507467f437147 100644 --- a/cc/resources/raster_tile_priority_queue_all.h +++ b/cc/tiles/raster_tile_priority_queue_all.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_ALL_H_ -#define CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_ALL_H_ +#ifndef CC_TILES_RASTER_TILE_PRIORITY_QUEUE_ALL_H_ +#define CC_TILES_RASTER_TILE_PRIORITY_QUEUE_ALL_H_ #include #include @@ -11,9 +11,9 @@ #include "cc/base/cc_export.h" #include "cc/layers/picture_layer_impl.h" -#include "cc/resources/raster_tile_priority_queue.h" -#include "cc/resources/tile_priority.h" -#include "cc/resources/tiling_set_raster_queue_all.h" +#include "cc/tiles/raster_tile_priority_queue.h" +#include "cc/tiles/tile_priority.h" +#include "cc/tiles/tiling_set_raster_queue_all.h" namespace cc { @@ -45,4 +45,4 @@ class CC_EXPORT RasterTilePriorityQueueAll : public RasterTilePriorityQueue { } // namespace cc -#endif // CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_ALL_H_ +#endif // CC_TILES_RASTER_TILE_PRIORITY_QUEUE_ALL_H_ diff --git a/cc/resources/raster_tile_priority_queue_required.cc b/cc/tiles/raster_tile_priority_queue_required.cc similarity index 95% rename from cc/resources/raster_tile_priority_queue_required.cc rename to cc/tiles/raster_tile_priority_queue_required.cc index 352b1adb5d7ff..bccc34bc6c36e 100644 --- a/cc/resources/raster_tile_priority_queue_required.cc +++ b/cc/tiles/raster_tile_priority_queue_required.cc @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/raster_tile_priority_queue_required.h" +#include "cc/tiles/raster_tile_priority_queue_required.h" -#include "cc/resources/tiling_set_raster_queue_required.h" +#include "cc/tiles/tiling_set_raster_queue_required.h" namespace cc { diff --git a/cc/resources/raster_tile_priority_queue_required.h b/cc/tiles/raster_tile_priority_queue_required.h similarity index 79% rename from cc/resources/raster_tile_priority_queue_required.h rename to cc/tiles/raster_tile_priority_queue_required.h index be41424ec3577..c554c18986954 100644 --- a/cc/resources/raster_tile_priority_queue_required.h +++ b/cc/tiles/raster_tile_priority_queue_required.h @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_REQUIRED_H_ -#define CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_REQUIRED_H_ +#ifndef CC_TILES_RASTER_TILE_PRIORITY_QUEUE_REQUIRED_H_ +#define CC_TILES_RASTER_TILE_PRIORITY_QUEUE_REQUIRED_H_ #include #include "cc/layers/picture_layer_impl.h" -#include "cc/resources/raster_tile_priority_queue.h" -#include "cc/resources/tiling_set_raster_queue_required.h" +#include "cc/tiles/raster_tile_priority_queue.h" +#include "cc/tiles/tiling_set_raster_queue_required.h" namespace cc { class PrioritizedTile; @@ -42,4 +42,4 @@ class RasterTilePriorityQueueRequired : public RasterTilePriorityQueue { } // namespace cc -#endif // CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_REQUIRED_H_ +#endif // CC_TILES_RASTER_TILE_PRIORITY_QUEUE_REQUIRED_H_ diff --git a/cc/resources/tile.cc b/cc/tiles/tile.cc similarity index 97% rename from cc/resources/tile.cc rename to cc/tiles/tile.cc index 7b98218071788..da4c08018d57c 100644 --- a/cc/resources/tile.cc +++ b/cc/tiles/tile.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/tile.h" +#include "cc/tiles/tile.h" #include #include "base/trace_event/trace_event_argument.h" #include "cc/base/math_util.h" #include "cc/debug/traced_value.h" -#include "cc/resources/tile_manager.h" +#include "cc/tiles/tile_manager.h" namespace cc { diff --git a/cc/resources/tile.h b/cc/tiles/tile.h similarity index 95% rename from cc/resources/tile.h rename to cc/tiles/tile.h index c15c848a194b3..68c4fc13e340a 100644 --- a/cc/resources/tile.h +++ b/cc/tiles/tile.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TILE_H_ -#define CC_RESOURCES_TILE_H_ +#ifndef CC_TILES_TILE_H_ +#define CC_TILES_TILE_H_ #include "base/memory/ref_counted.h" -#include "cc/resources/tile_draw_info.h" +#include "cc/tiles/tile_draw_info.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/size.h" @@ -114,4 +114,4 @@ using ScopedTilePtr = scoped_ptr; } // namespace cc -#endif // CC_RESOURCES_TILE_H_ +#endif // CC_TILES_TILE_H_ diff --git a/cc/resources/tile_draw_info.cc b/cc/tiles/tile_draw_info.cc similarity index 94% rename from cc/resources/tile_draw_info.cc rename to cc/tiles/tile_draw_info.cc index 4545494155c34..e523079aac924 100644 --- a/cc/resources/tile_draw_info.cc +++ b/cc/tiles/tile_draw_info.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/tile_draw_info.h" +#include "cc/tiles/tile_draw_info.h" #include "cc/base/math_util.h" diff --git a/cc/resources/tile_draw_info.h b/cc/tiles/tile_draw_info.h similarity index 93% rename from cc/resources/tile_draw_info.h rename to cc/tiles/tile_draw_info.h index 7db805fbe9b72..f094efd6f388b 100644 --- a/cc/resources/tile_draw_info.h +++ b/cc/tiles/tile_draw_info.h @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TILE_DRAW_INFO_H_ -#define CC_RESOURCES_TILE_DRAW_INFO_H_ +#ifndef CC_TILES_TILE_DRAW_INFO_H_ +#define CC_TILES_TILE_DRAW_INFO_H_ #include "base/memory/scoped_ptr.h" #include "base/trace_event/trace_event_argument.h" +#include "cc/raster/tile_task_runner.h" #include "cc/resources/platform_color.h" #include "cc/resources/resource_provider.h" #include "cc/resources/scoped_resource.h" -#include "cc/resources/tile_task_runner.h" namespace cc { @@ -103,4 +103,4 @@ class CC_EXPORT TileDrawInfo { } // namespace cc -#endif // CC_RESOURCES_TILE_DRAW_INFO_H_ +#endif // CC_TILES_TILE_DRAW_INFO_H_ diff --git a/cc/resources/tile_manager.cc b/cc/tiles/tile_manager.cc similarity index 99% rename from cc/resources/tile_manager.cc rename to cc/tiles/tile_manager.cc index 6cd02399863ba..a67563a44023a 100644 --- a/cc/resources/tile_manager.cc +++ b/cc/tiles/tile_manager.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/tile_manager.h" +#include "cc/tiles/tile_manager.h" #include #include @@ -17,9 +17,9 @@ #include "cc/debug/frame_viewer_instrumentation.h" #include "cc/debug/traced_value.h" #include "cc/layers/picture_layer_impl.h" -#include "cc/resources/raster_buffer.h" -#include "cc/resources/tile.h" -#include "cc/resources/tile_task_runner.h" +#include "cc/raster/raster_buffer.h" +#include "cc/raster/tile_task_runner.h" +#include "cc/tiles/tile.h" #include "ui/gfx/geometry/rect_conversions.h" namespace cc { diff --git a/cc/resources/tile_manager.h b/cc/tiles/tile_manager.h similarity index 96% rename from cc/resources/tile_manager.h rename to cc/tiles/tile_manager.h index d5bc76386e43e..8611b3a361584 100644 --- a/cc/resources/tile_manager.h +++ b/cc/tiles/tile_manager.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TILE_MANAGER_H_ -#define CC_RESOURCES_TILE_MANAGER_H_ +#ifndef CC_TILES_TILE_MANAGER_H_ +#define CC_TILES_TILE_MANAGER_H_ #include #include @@ -15,14 +15,14 @@ #include "base/memory/scoped_ptr.h" #include "base/values.h" #include "cc/base/unique_notifier.h" -#include "cc/resources/eviction_tile_priority_queue.h" +#include "cc/playback/raster_source.h" +#include "cc/raster/tile_task_runner.h" #include "cc/resources/memory_history.h" -#include "cc/resources/raster_source.h" -#include "cc/resources/raster_tile_priority_queue.h" #include "cc/resources/resource_pool.h" -#include "cc/resources/tile.h" -#include "cc/resources/tile_draw_info.h" -#include "cc/resources/tile_task_runner.h" +#include "cc/tiles/eviction_tile_priority_queue.h" +#include "cc/tiles/raster_tile_priority_queue.h" +#include "cc/tiles/tile.h" +#include "cc/tiles/tile_draw_info.h" namespace base { namespace trace_event { @@ -312,4 +312,4 @@ class CC_EXPORT TileManager : public TileTaskRunnerClient { } // namespace cc -#endif // CC_RESOURCES_TILE_MANAGER_H_ +#endif // CC_TILES_TILE_MANAGER_H_ diff --git a/cc/resources/tile_manager_perftest.cc b/cc/tiles/tile_manager_perftest.cc similarity index 99% rename from cc/resources/tile_manager_perftest.cc rename to cc/tiles/tile_manager_perftest.cc index 47088d7032ba6..7b75a7a09bb72 100644 --- a/cc/resources/tile_manager_perftest.cc +++ b/cc/tiles/tile_manager_perftest.cc @@ -6,9 +6,7 @@ #include "base/thread_task_runner_handle.h" #include "base/time/time.h" #include "cc/debug/lap_timer.h" -#include "cc/resources/raster_buffer.h" -#include "cc/resources/tile.h" -#include "cc/resources/tile_priority.h" +#include "cc/raster/raster_buffer.h" #include "cc/test/begin_frame_args_test.h" #include "cc/test/fake_impl_proxy.h" #include "cc/test/fake_layer_tree_host_impl.h" @@ -22,6 +20,8 @@ #include "cc/test/test_shared_bitmap_manager.h" #include "cc/test/test_task_graph_runner.h" #include "cc/test/test_tile_priorities.h" +#include "cc/tiles/tile.h" +#include "cc/tiles/tile_priority.h" #include "cc/trees/layer_tree_impl.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/cc/resources/tile_manager_unittest.cc b/cc/tiles/tile_manager_unittest.cc similarity index 98% rename from cc/resources/tile_manager_unittest.cc rename to cc/tiles/tile_manager_unittest.cc index 3a8077e3cd490..bddf29f53b661 100644 --- a/cc/resources/tile_manager_unittest.cc +++ b/cc/tiles/tile_manager_unittest.cc @@ -3,12 +3,7 @@ // found in the LICENSE file. #include "base/thread_task_runner_handle.h" -#include "cc/resources/eviction_tile_priority_queue.h" -#include "cc/resources/raster_tile_priority_queue.h" #include "cc/resources/resource_pool.h" -#include "cc/resources/tile.h" -#include "cc/resources/tile_priority.h" -#include "cc/resources/tiling_set_raster_queue_all.h" #include "cc/test/begin_frame_args_test.h" #include "cc/test/fake_impl_proxy.h" #include "cc/test/fake_layer_tree_host_impl.h" @@ -22,6 +17,11 @@ #include "cc/test/test_shared_bitmap_manager.h" #include "cc/test/test_task_graph_runner.h" #include "cc/test/test_tile_priorities.h" +#include "cc/tiles/eviction_tile_priority_queue.h" +#include "cc/tiles/raster_tile_priority_queue.h" +#include "cc/tiles/tile.h" +#include "cc/tiles/tile_priority.h" +#include "cc/tiles/tiling_set_raster_queue_all.h" #include "cc/trees/layer_tree_impl.h" #include "testing/gtest/include/gtest/gtest.h" @@ -30,10 +30,7 @@ namespace { class LowResTilingsSettings : public ImplSidePaintingSettings { public: - LowResTilingsSettings() { - tiling_interest_area_viewport_multiplier = 10000; - create_low_res_tiling = true; - } + LowResTilingsSettings() { create_low_res_tiling = true; } }; class TileManagerTilePriorityQueueTest : public testing::Test { @@ -1180,10 +1177,10 @@ TEST_F(TileManagerTilePriorityQueueTest, client.SetTileSize(gfx::Size(30, 30)); LayerTreeSettings settings; - settings.tiling_interest_area_viewport_multiplier = 10000; + settings.max_tiles_for_interest_area = 10000; scoped_ptr tiling_set = PictureLayerTilingSet::Create( - ACTIVE_TREE, &client, settings.tiling_interest_area_viewport_multiplier, + ACTIVE_TREE, &client, settings.max_tiles_for_interest_area, settings.skewport_target_time_in_seconds, settings.skewport_extrapolation_limit_in_content_pixels); @@ -1290,9 +1287,10 @@ TEST_F(TileManagerTilePriorityQueueTest, client.SetTileSize(gfx::Size(30, 30)); LayerTreeSettings settings; + settings.max_tiles_for_interest_area = 10000; scoped_ptr tiling_set = PictureLayerTilingSet::Create( - ACTIVE_TREE, &client, settings.tiling_interest_area_viewport_multiplier, + ACTIVE_TREE, &client, settings.max_tiles_for_interest_area, settings.skewport_target_time_in_seconds, settings.skewport_extrapolation_limit_in_content_pixels); diff --git a/cc/resources/tile_priority.cc b/cc/tiles/tile_priority.cc similarity index 98% rename from cc/resources/tile_priority.cc rename to cc/tiles/tile_priority.cc index 33dfcbe0dae6a..cf9872e6dcd49 100644 --- a/cc/resources/tile_priority.cc +++ b/cc/tiles/tile_priority.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/tile_priority.h" +#include "cc/tiles/tile_priority.h" #include "base/trace_event/trace_event_argument.h" #include "base/values.h" diff --git a/cc/resources/tile_priority.h b/cc/tiles/tile_priority.h similarity index 96% rename from cc/resources/tile_priority.h rename to cc/tiles/tile_priority.h index 16a1d98a10429..184fc2dd181f2 100644 --- a/cc/resources/tile_priority.h +++ b/cc/tiles/tile_priority.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TILE_PRIORITY_H_ -#define CC_RESOURCES_TILE_PRIORITY_H_ +#ifndef CC_TILES_TILE_PRIORITY_H_ +#define CC_TILES_TILE_PRIORITY_H_ #include #include @@ -123,4 +123,4 @@ class GlobalStateThatImpactsTilePriority { } // namespace cc -#endif // CC_RESOURCES_TILE_PRIORITY_H_ +#endif // CC_TILES_TILE_PRIORITY_H_ diff --git a/cc/resources/tile_priority_unittest.cc b/cc/tiles/tile_priority_unittest.cc similarity index 98% rename from cc/resources/tile_priority_unittest.cc rename to cc/tiles/tile_priority_unittest.cc index e134bc976426c..14627bb571214 100644 --- a/cc/resources/tile_priority_unittest.cc +++ b/cc/tiles/tile_priority_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/tile_priority.h" +#include "cc/tiles/tile_priority.h" #include "testing/gtest/include/gtest/gtest.h" namespace cc { diff --git a/cc/resources/tiling_set_eviction_queue.cc b/cc/tiles/tiling_set_eviction_queue.cc similarity index 99% rename from cc/resources/tiling_set_eviction_queue.cc rename to cc/tiles/tiling_set_eviction_queue.cc index f494da3fa3e88..9329d0db29ab1 100644 --- a/cc/resources/tiling_set_eviction_queue.cc +++ b/cc/tiles/tiling_set_eviction_queue.cc @@ -4,7 +4,7 @@ #include -#include "cc/resources/tiling_set_eviction_queue.h" +#include "cc/tiles/tiling_set_eviction_queue.h" namespace cc { diff --git a/cc/resources/tiling_set_eviction_queue.h b/cc/tiles/tiling_set_eviction_queue.h similarity index 96% rename from cc/resources/tiling_set_eviction_queue.h rename to cc/tiles/tiling_set_eviction_queue.h index 58e5a7d743e4e..dc9b686697460 100644 --- a/cc/resources/tiling_set_eviction_queue.h +++ b/cc/tiles/tiling_set_eviction_queue.h @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_ -#define CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_ +#ifndef CC_TILES_TILING_SET_EVICTION_QUEUE_H_ +#define CC_TILES_TILING_SET_EVICTION_QUEUE_H_ #include #include "cc/base/cc_export.h" -#include "cc/resources/picture_layer_tiling_set.h" -#include "cc/resources/prioritized_tile.h" +#include "cc/tiles/picture_layer_tiling_set.h" +#include "cc/tiles/prioritized_tile.h" namespace cc { @@ -200,4 +200,4 @@ class CC_EXPORT TilingSetEvictionQueue { } // namespace cc -#endif // CC_RESOURCES_TILING_SET_EVICTION_QUEUE_H_ +#endif // CC_TILES_TILING_SET_EVICTION_QUEUE_H_ diff --git a/cc/resources/tiling_set_raster_queue_all.cc b/cc/tiles/tiling_set_raster_queue_all.cc similarity index 98% rename from cc/resources/tiling_set_raster_queue_all.cc rename to cc/tiles/tiling_set_raster_queue_all.cc index 330f0883a80e6..ae91f271fc205 100644 --- a/cc/resources/tiling_set_raster_queue_all.cc +++ b/cc/tiles/tiling_set_raster_queue_all.cc @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/tiling_set_raster_queue_all.h" +#include "cc/tiles/tiling_set_raster_queue_all.h" #include -#include "cc/resources/picture_layer_tiling_set.h" -#include "cc/resources/tile.h" -#include "cc/resources/tile_priority.h" +#include "cc/tiles/picture_layer_tiling_set.h" +#include "cc/tiles/tile.h" +#include "cc/tiles/tile_priority.h" namespace cc { diff --git a/cc/resources/tiling_set_raster_queue_all.h b/cc/tiles/tiling_set_raster_queue_all.h similarity index 94% rename from cc/resources/tiling_set_raster_queue_all.h rename to cc/tiles/tiling_set_raster_queue_all.h index 8c8b01224e562..62d2249373046 100644 --- a/cc/resources/tiling_set_raster_queue_all.h +++ b/cc/tiles/tiling_set_raster_queue_all.h @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TILING_SET_RASTER_QUEUE_ALL_H_ -#define CC_RESOURCES_TILING_SET_RASTER_QUEUE_ALL_H_ +#ifndef CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_ +#define CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_ #include "base/containers/stack_container.h" #include "cc/base/cc_export.h" -#include "cc/resources/picture_layer_tiling_set.h" -#include "cc/resources/prioritized_tile.h" -#include "cc/resources/tile.h" -#include "cc/resources/tile_priority.h" +#include "cc/tiles/picture_layer_tiling_set.h" +#include "cc/tiles/prioritized_tile.h" +#include "cc/tiles/tile.h" +#include "cc/tiles/tile_priority.h" namespace cc { @@ -196,4 +196,4 @@ class CC_EXPORT TilingSetRasterQueueAll { } // namespace cc -#endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_ALL_H_ +#endif // CC_TILES_TILING_SET_RASTER_QUEUE_ALL_H_ diff --git a/cc/resources/tiling_set_raster_queue_required.cc b/cc/tiles/tiling_set_raster_queue_required.cc similarity index 96% rename from cc/resources/tiling_set_raster_queue_required.cc rename to cc/tiles/tiling_set_raster_queue_required.cc index f95cd42d76109..07b123484c5ec 100644 --- a/cc/resources/tiling_set_raster_queue_required.cc +++ b/cc/tiles/tiling_set_raster_queue_required.cc @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "cc/resources/tiling_set_raster_queue_required.h" +#include "cc/tiles/tiling_set_raster_queue_required.h" #include -#include "cc/resources/picture_layer_tiling_set.h" -#include "cc/resources/tile.h" -#include "cc/resources/tile_priority.h" +#include "cc/tiles/picture_layer_tiling_set.h" +#include "cc/tiles/tile.h" +#include "cc/tiles/tile_priority.h" namespace cc { diff --git a/cc/resources/tiling_set_raster_queue_required.h b/cc/tiles/tiling_set_raster_queue_required.h similarity index 83% rename from cc/resources/tiling_set_raster_queue_required.h rename to cc/tiles/tiling_set_raster_queue_required.h index 8cd01f6e1fcbc..4573d0409395f 100644 --- a/cc/resources/tiling_set_raster_queue_required.h +++ b/cc/tiles/tiling_set_raster_queue_required.h @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CC_RESOURCES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ -#define CC_RESOURCES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ +#ifndef CC_TILES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ +#define CC_TILES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ #include "cc/base/cc_export.h" -#include "cc/resources/picture_layer_tiling_set.h" -#include "cc/resources/raster_tile_priority_queue.h" -#include "cc/resources/tile.h" +#include "cc/tiles/picture_layer_tiling_set.h" +#include "cc/tiles/raster_tile_priority_queue.h" +#include "cc/tiles/tile.h" namespace cc { @@ -57,4 +57,4 @@ class CC_EXPORT TilingSetRasterQueueRequired { } // namespace cc -#endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ +#endif // CC_TILES_TILING_SET_RASTER_QUEUE_REQUIRED_H_ diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index d5e6ad6871d75..9e1474586cb4a 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -47,26 +47,26 @@ #include "cc/output/delegating_renderer.h" #include "cc/output/gl_renderer.h" #include "cc/output/software_renderer.h" +#include "cc/output/texture_mailbox_deleter.h" #include "cc/quads/render_pass_draw_quad.h" #include "cc/quads/shared_quad_state.h" #include "cc/quads/solid_color_draw_quad.h" #include "cc/quads/texture_draw_quad.h" -#include "cc/resources/bitmap_tile_task_worker_pool.h" -#include "cc/resources/eviction_tile_priority_queue.h" -#include "cc/resources/gpu_rasterizer.h" -#include "cc/resources/gpu_tile_task_worker_pool.h" +#include "cc/raster/bitmap_tile_task_worker_pool.h" +#include "cc/raster/gpu_rasterizer.h" +#include "cc/raster/gpu_tile_task_worker_pool.h" +#include "cc/raster/one_copy_tile_task_worker_pool.h" +#include "cc/raster/pixel_buffer_tile_task_worker_pool.h" +#include "cc/raster/tile_task_worker_pool.h" +#include "cc/raster/zero_copy_tile_task_worker_pool.h" #include "cc/resources/memory_history.h" -#include "cc/resources/one_copy_tile_task_worker_pool.h" -#include "cc/resources/picture_layer_tiling.h" -#include "cc/resources/pixel_buffer_tile_task_worker_pool.h" #include "cc/resources/prioritized_resource_manager.h" -#include "cc/resources/raster_tile_priority_queue.h" #include "cc/resources/resource_pool.h" -#include "cc/resources/texture_mailbox_deleter.h" -#include "cc/resources/tile_task_worker_pool.h" #include "cc/resources/ui_resource_bitmap.h" -#include "cc/resources/zero_copy_tile_task_worker_pool.h" #include "cc/scheduler/delay_based_time_source.h" +#include "cc/tiles/eviction_tile_priority_queue.h" +#include "cc/tiles/picture_layer_tiling.h" +#include "cc/tiles/raster_tile_priority_queue.h" #include "cc/trees/damage_tracker.h" #include "cc/trees/latency_info_swap_promise_monitor.h" #include "cc/trees/layer_tree_host.h" @@ -1296,6 +1296,20 @@ void LayerTreeHostImpl::NotifyTileStateChanged(const Tile* tile) { void LayerTreeHostImpl::SetMemoryPolicy(const ManagedMemoryPolicy& policy) { SetManagedMemoryPolicy(policy); + + // This is short term solution to synchronously drop tile resources when + // using synchronous compositing to avoid memory usage regression. + // TODO(boliu): crbug.com/499004 to track removing this. + if (!policy.bytes_limit_when_visible && tile_manager_ && + settings_.using_synchronous_renderer_compositor) { + ReleaseTreeResources(); + // TileManager destruction will synchronoulsy wait for all tile workers to + // be cancelled or completed. This allows all resources to be freed + // synchronously. + DestroyTileManager(); + CreateAndSetTileManager(); + RecreateTreeResources(); + } } void LayerTreeHostImpl::SetTreeActivationCallback( @@ -1577,6 +1591,9 @@ void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) { for (size_t i = 0; i < frame.will_draw_layers.size(); ++i) frame.will_draw_layers[i]->DidDraw(resource_provider_.get()); + for (auto& it : video_frame_controllers_) + it->DidDrawFrame(); + // Once all layers have been drawn, pending texture uploads should no // longer block future uploads. resource_provider_->MarkPendingUploadsAsNonBlocking(); @@ -2608,6 +2625,13 @@ gfx::Vector2dF LayerTreeHostImpl::ScrollLayer(LayerImpl* layer_impl, delta); } +static LayerImpl* nextLayerInScrollOrder(LayerImpl* layer) { + if (layer->scroll_parent()) + return layer->scroll_parent(); + + return layer->parent(); +} + InputHandlerScrollResult LayerTreeHostImpl::ScrollBy( const gfx::Point& viewport_point, const gfx::Vector2dF& scroll_delta) { @@ -2623,7 +2647,7 @@ InputHandlerScrollResult LayerTreeHostImpl::ScrollBy( for (LayerImpl* layer_impl = CurrentlyScrollingLayer(); layer_impl; - layer_impl = layer_impl->parent()) { + layer_impl = nextLayerInScrollOrder(layer_impl)) { // Skip the outer viewport scroll layer so that we try to scroll the // viewport only once. i.e. The inner viewport layer represents the // viewport. diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h index 82955d4ea4979..42454a61c00ec 100644 --- a/cc/trees/layer_tree_host_impl.h +++ b/cc/trees/layer_tree_host_impl.h @@ -31,11 +31,11 @@ #include "cc/output/renderer.h" #include "cc/quads/render_pass.h" #include "cc/resources/resource_provider.h" -#include "cc/resources/tile_manager.h" #include "cc/resources/ui_resource_client.h" #include "cc/scheduler/commit_earlyout_reason.h" #include "cc/scheduler/draw_result.h" #include "cc/scheduler/video_frame_controller.h" +#include "cc/tiles/tile_manager.h" #include "cc/trees/layer_tree_settings.h" #include "cc/trees/proxy.h" #include "skia/ext/refptr.h" diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc index 15994ef927f9e..8ff2f62a1e3f6 100644 --- a/cc/trees/layer_tree_host_impl_unittest.cc +++ b/cc/trees/layer_tree_host_impl_unittest.cc @@ -40,7 +40,6 @@ #include "cc/quads/solid_color_draw_quad.h" #include "cc/quads/texture_draw_quad.h" #include "cc/quads/tile_draw_quad.h" -#include "cc/resources/layer_tiling_data.h" #include "cc/test/animation_test_common.h" #include "cc/test/begin_frame_args_test.h" #include "cc/test/fake_layer_tree_host_impl.h" @@ -59,6 +58,7 @@ #include "cc/test/test_shared_bitmap_manager.h" #include "cc/test/test_task_graph_runner.h" #include "cc/test/test_web_graphics_context_3d.h" +#include "cc/tiles/layer_tiling_data.h" #include "cc/trees/layer_tree_impl.h" #include "cc/trees/single_thread_proxy.h" #include "media/base/media.h" @@ -101,7 +101,7 @@ class LayerTreeHostImplTest : public testing::Test, reduce_memory_result_(true), current_limit_bytes_(0), current_priority_cutoff_value_(0) { - media::InitializeMediaLibraryForTesting(); + media::InitializeMediaLibrary(); } LayerTreeSettings DefaultSettings() { @@ -1149,6 +1149,85 @@ TEST_F(LayerTreeHostImplTest, ScrollWithSwapPromises) { EXPECT_EQ(latency_info.trace_id, scroll_info->swap_promises[0]->TraceId()); } +// Test that scrolls targeting a layer with a non-null scroll_parent() bubble +// up to the scroll_parent, rather than the stacking parent. +TEST_F(LayerTreeHostImplTest, ScrollBubblesToScrollParent) { + LayerImpl* viewport_scroll = + SetupScrollAndContentsLayers(gfx::Size(100, 100)); + host_impl_->SetViewportSize(gfx::Size(50, 50)); + + // Set up two scrolling children of the root, one of which is a scroll parent + // to the other. Scrolls bubbling from the child should bubble to the parent, + // not the viewport. + LayerImpl *parent; + LayerImpl *child; + LayerImpl *child_clip; + + scoped_ptr scroll_parent_clip = + LayerImpl::Create(host_impl_->active_tree(), 6); + scoped_ptr scroll_parent = CreateScrollableLayer( + 7, gfx::Size(10, 10), scroll_parent_clip.get()); + parent = scroll_parent.get(); + scroll_parent_clip->AddChild(scroll_parent.Pass()); + + viewport_scroll->AddChild(scroll_parent_clip.Pass()); + + scoped_ptr scroll_child_clip = + LayerImpl::Create(host_impl_->active_tree(), 8); + scoped_ptr scroll_child = CreateScrollableLayer( + 9, gfx::Size(10, 10), scroll_child_clip.get()); + child = scroll_child.get(); + scroll_child->SetPosition(gfx::Point(20, 20)); + scroll_child_clip->AddChild(scroll_child.Pass()); + + child_clip = scroll_child_clip.get(); + viewport_scroll->AddChild(scroll_child_clip.Pass()); + + child_clip->SetScrollParent(parent); + + DrawFrame(); + + { + host_impl_->ScrollBegin(gfx::Point(21, 21), InputHandler::GESTURE); + host_impl_->ScrollBy(gfx::Point(21, 21), gfx::Vector2d(5, 5)); + host_impl_->ScrollBy(gfx::Point(21, 21), gfx::Vector2d(2, 1)); + host_impl_->ScrollEnd(); + + // The child should be fully scrolled by the first ScrollBy. + EXPECT_VECTOR_EQ(gfx::Vector2dF(5, 5), child->CurrentScrollOffset()); + + // The scroll_parent should receive the bubbled up second ScrollBy. + EXPECT_VECTOR_EQ(gfx::Vector2dF(2, 1), parent->CurrentScrollOffset()); + + // The viewport shouldn't have been scrolled at all. + EXPECT_VECTOR_EQ( + gfx::Vector2dF(0, 0), + host_impl_->InnerViewportScrollLayer()->CurrentScrollOffset()); + EXPECT_VECTOR_EQ( + gfx::Vector2dF(0, 0), + host_impl_->OuterViewportScrollLayer()->CurrentScrollOffset()); + } + + { + host_impl_->ScrollBegin(gfx::Point(21, 21), InputHandler::GESTURE); + host_impl_->ScrollBy(gfx::Point(21, 21), gfx::Vector2d(3, 4)); + host_impl_->ScrollBy(gfx::Point(21, 21), gfx::Vector2d(2, 1)); + host_impl_->ScrollEnd(); + + // The first ScrollBy should scroll the parent to its extent. + EXPECT_VECTOR_EQ(gfx::Vector2dF(5, 5), parent->CurrentScrollOffset()); + + // The viewport should now be next in bubbling order. + EXPECT_VECTOR_EQ( + gfx::Vector2dF(2, 1), + host_impl_->InnerViewportScrollLayer()->CurrentScrollOffset()); + EXPECT_VECTOR_EQ( + gfx::Vector2dF(0, 0), + host_impl_->OuterViewportScrollLayer()->CurrentScrollOffset()); + } +} + + TEST_F(LayerTreeHostImplTest, PinchGesture) { SetupScrollAndContentsLayers(gfx::Size(100, 100)); host_impl_->SetViewportSize(gfx::Size(50, 50)); @@ -7684,12 +7763,18 @@ class FakeVideoFrameController : public VideoFrameController { public: void OnBeginFrame(const BeginFrameArgs& args) override { begin_frame_args_ = args; + did_draw_frame_ = false; } - const BeginFrameArgs& begin_frame_args() { return begin_frame_args_; } + void DidDrawFrame() override { did_draw_frame_ = true; } + + const BeginFrameArgs& begin_frame_args() const { return begin_frame_args_; } + + bool did_draw_frame() const { return did_draw_frame_; } private: BeginFrameArgs begin_frame_args_; + bool did_draw_frame_ = false; }; TEST_F(LayerTreeHostImplTest, AddVideoFrameControllerInsideFrame) { @@ -7702,6 +7787,17 @@ TEST_F(LayerTreeHostImplTest, AddVideoFrameControllerInsideFrame) { host_impl_->AddVideoFrameController(&controller); EXPECT_TRUE(controller.begin_frame_args().IsValid()); host_impl_->DidFinishImplFrame(); + + EXPECT_FALSE(controller.did_draw_frame()); + LayerTreeHostImpl::FrameData frame; + host_impl_->DidDrawAllLayers(frame); + EXPECT_TRUE(controller.did_draw_frame()); + + controller.OnBeginFrame(begin_frame_args); + EXPECT_FALSE(controller.did_draw_frame()); + host_impl_->RemoveVideoFrameController(&controller); + host_impl_->DidDrawAllLayers(frame); + EXPECT_FALSE(controller.did_draw_frame()); } TEST_F(LayerTreeHostImplTest, AddVideoFrameControllerOutsideFrame) { @@ -7720,6 +7816,17 @@ TEST_F(LayerTreeHostImplTest, AddVideoFrameControllerOutsideFrame) { EXPECT_FALSE(controller.begin_frame_args().IsValid()); host_impl_->WillBeginImplFrame(begin_frame_args); EXPECT_TRUE(controller.begin_frame_args().IsValid()); + + EXPECT_FALSE(controller.did_draw_frame()); + LayerTreeHostImpl::FrameData frame; + host_impl_->DidDrawAllLayers(frame); + EXPECT_TRUE(controller.did_draw_frame()); + + controller.OnBeginFrame(begin_frame_args); + EXPECT_FALSE(controller.did_draw_frame()); + host_impl_->RemoveVideoFrameController(&controller); + host_impl_->DidDrawAllLayers(frame); + EXPECT_FALSE(controller.did_draw_frame()); } TEST_F(LayerTreeHostImplTest, GpuRasterizationStatusModes) { diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc index a2f06113f039c..82e47b89b0e30 100644 --- a/cc/trees/layer_tree_host_unittest_context.cc +++ b/cc/trees/layer_tree_host_unittest_context.cc @@ -66,7 +66,7 @@ class LayerTreeHostContextTest : public LayerTreeTest { context_should_support_io_surface_(false), fallback_context_works_(false), async_output_surface_creation_(false) { - media::InitializeMediaLibraryForTesting(); + media::InitializeMediaLibrary(); } void LoseContext() { diff --git a/cc/trees/layer_tree_host_unittest_delegated.cc b/cc/trees/layer_tree_host_unittest_delegated.cc index 6d0fb0a886ade..2864eb82ad6df 100644 --- a/cc/trees/layer_tree_host_unittest_delegated.cc +++ b/cc/trees/layer_tree_host_unittest_delegated.cc @@ -404,6 +404,37 @@ class LayerTreeHostDelegatedTestCreateChildId SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestCreateChildId); +class LayerTreeHostDelegatedTestDontUseLostChildIdAfterCommit + : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { + protected: + void BeginTest() override { + SetFrameData(CreateFrameData(gfx::Rect(0, 0, 1, 1), gfx::Rect(0, 0, 1, 1))); + LayerTreeHostDelegatedTestCaseSingleDelegatedLayer::BeginTest(); + } + + void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { + // Act like the context was lost while the layer is in the pending tree. + LayerImpl* root_impl = host_impl->sync_tree()->root_layer(); + FakeDelegatedRendererLayerImpl* delegated_impl = + static_cast(root_impl->children()[0]); + delegated_impl->ReleaseResources(); + } + + void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override { + LayerImpl* root_impl = host_impl->active_tree()->root_layer(); + FakeDelegatedRendererLayerImpl* delegated_impl = + static_cast(root_impl->children()[0]); + + // Should not try to activate a frame without a child id. If we did try to + // activate we would crash. + EXPECT_FALSE(delegated_impl->ChildId()); + EndTest(); + } +}; + +MULTI_THREAD_IMPL_TEST_F( + LayerTreeHostDelegatedTestDontUseLostChildIdAfterCommit); + // Test that we can gracefully handle invalid frames after the context was lost. // For example, we might be trying to use the previous frame in that case and // have to make sure we don't crash because our resource accounting goes wrong. diff --git a/cc/trees/layer_tree_settings.cc b/cc/trees/layer_tree_settings.cc index d2c3bda2b9c45..f7f6f3047da90 100644 --- a/cc/trees/layer_tree_settings.cc +++ b/cc/trees/layer_tree_settings.cc @@ -52,7 +52,8 @@ LayerTreeSettings::LayerTreeSettings() default_tile_grid_size(gfx::Size(256, 256)), minimum_occlusion_tracking_size(gfx::Size(160, 160)), use_pinch_virtual_viewport(false), - tiling_interest_area_viewport_multiplier(9.0f), + // At 256x256 tiles, 128 tiles cover an area of 2048x4096 pixels. + max_tiles_for_interest_area(128), skewport_target_time_in_seconds(1.0f), skewport_extrapolation_limit_in_content_pixels(2000), max_unused_resource_memory_percentage(100), diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h index 0e1819b0d9578..56cfa3a98094d 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h @@ -65,7 +65,7 @@ class CC_EXPORT LayerTreeSettings { gfx::Size default_tile_grid_size; gfx::Size minimum_occlusion_tracking_size; bool use_pinch_virtual_viewport; - float tiling_interest_area_viewport_multiplier; + size_t max_tiles_for_interest_area; float skewport_target_time_in_seconds; int skewport_extrapolation_limit_in_content_pixels; size_t max_unused_resource_memory_percentage; diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc index 26031400ed8cf..d369ad9106005 100644 --- a/cc/trees/property_tree.cc +++ b/cc/trees/property_tree.cc @@ -382,7 +382,7 @@ void TransformTree::UpdateSnapping(TransformNode* node) { node->data.scroll_snap = translation; } -PropertyTrees::PropertyTrees() : needs_rebuild(true) { +PropertyTrees::PropertyTrees() : needs_rebuild(true), sequence_number(0) { } } // namespace cc diff --git a/cc/trees/property_tree.h b/cc/trees/property_tree.h index 2341493b12598..caa819c6c6d00 100644 --- a/cc/trees/property_tree.h +++ b/cc/trees/property_tree.h @@ -140,8 +140,16 @@ class CC_EXPORT PropertyTree { int Insert(const T& tree_node, int parent_id); - T* Node(int i) { return i > -1 ? &nodes_[i] : nullptr; } - const T* Node(int i) const { return i > -1 ? &nodes_[i] : nullptr; } + T* Node(int i) { + // TODO(vollick): remove this. + CHECK(i < static_cast(nodes_.size())); + return i > -1 ? &nodes_[i] : nullptr; + } + const T* Node(int i) const { + // TODO(vollick): remove this. + CHECK(i < static_cast(nodes_.size())); + return i > -1 ? &nodes_[i] : nullptr; + } T* parent(const T* t) { return Node(t->parent_id); } const T* parent(const T* t) const { return Node(t->parent_id); } @@ -245,6 +253,7 @@ class CC_EXPORT PropertyTrees final { OpacityTree opacity_tree; ClipTree clip_tree; bool needs_rebuild; + int sequence_number; }; } // namespace cc diff --git a/cc/trees/property_tree_builder.cc b/cc/trees/property_tree_builder.cc index 6d8c98999714f..815692db21187 100644 --- a/cc/trees/property_tree_builder.cc +++ b/cc/trees/property_tree_builder.cc @@ -38,6 +38,7 @@ struct DataForRecursion { bool ancestor_clips_subtree; const gfx::Transform* device_transform; gfx::Vector2dF scroll_compensation_adjustment; + int sequence_number; }; template @@ -148,7 +149,7 @@ void AddClipNodeIfNeeded(const DataForRecursion& data_from_ancestor, data_for_children->clip_tree->Insert(node, parent_id); } - layer->set_clip_tree_index( + layer->SetClipTreeIndex( has_unclipped_surface ? 0 : data_for_children->clip_tree_parent); // TODO(awoloszyn): Right now when we hit a node with a replica, we reset the @@ -233,14 +234,14 @@ bool AddTransformNodeIfNeeded( local_offset); layer->set_should_flatten_transform_from_property_tree( data_from_ancestor.should_flatten); - layer->set_transform_tree_index(parent_index); + layer->SetTransformTreeIndex(parent_index); return false; } data_for_children->transform_tree->Insert(TransformNode(), parent_index); TransformNode* node = data_for_children->transform_tree->back(); - layer->set_transform_tree_index(node->id); + layer->SetTransformTreeIndex(node->id); node->data.scrolls = is_scrollable; node->data.flattens_inherited_transform = data_for_children->should_flatten; @@ -328,7 +329,7 @@ void AddOpacityNodeIfNeeded( int parent_id = data_from_ancestor.opacity_tree_parent; if (!requires_node) { - layer->set_opacity_tree_index(parent_id); + layer->SetOpacityTreeIndex(parent_id); data_for_children->opacity_tree_parent = parent_id; return; } @@ -338,13 +339,14 @@ void AddOpacityNodeIfNeeded( node.data = layer->opacity(); data_for_children->opacity_tree_parent = data_for_children->opacity_tree->Insert(node, parent_id); - layer->set_opacity_tree_index(data_for_children->opacity_tree_parent); + layer->SetOpacityTreeIndex(data_for_children->opacity_tree_parent); } template void BuildPropertyTreesInternal( LayerType* layer, const DataForRecursion& data_from_parent) { + layer->set_property_tree_sequence_number(data_from_parent.sequence_number); DataForRecursion data_for_children(data_from_parent); if (layer->render_surface()) data_for_children.render_target = layer; @@ -385,6 +387,8 @@ void BuildPropertyTreesTopLevelInternal(LayerType* root_layer, const gfx::Rect& viewport, const gfx::Transform& device_transform, PropertyTrees* property_trees) { + property_trees->sequence_number++; + DataForRecursion data_for_recursion; data_for_recursion.transform_tree = &property_trees->transform_tree; data_for_recursion.clip_tree = &property_trees->clip_tree; @@ -405,6 +409,7 @@ void BuildPropertyTreesTopLevelInternal(LayerType* root_layer, data_for_recursion.transform_tree->clear(); data_for_recursion.clip_tree->clear(); data_for_recursion.opacity_tree->clear(); + data_for_recursion.sequence_number = property_trees->sequence_number; ClipNode root_clip; root_clip.data.clip = viewport; diff --git a/chrome/VERSION b/chrome/VERSION index d58fd78824cc8..7b700dfbcdf95 100644 --- a/chrome/VERSION +++ b/chrome/VERSION @@ -1,4 +1,4 @@ MAJOR=44 MINOR=0 BUILD=2403 -PATCH=0 +PATCH=130 diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index bb189ea5460c2..f4440ee62b643 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn @@ -119,7 +119,7 @@ android_library("chrome_java") { "//chrome:page_info_connection_type_javagen", "//chrome:content_setting_javagen", "//chrome:content_settings_type_javagen", - "//components/enhanced_bookmarks:enhanced_bookmarks_launch_location_srcjar", + "//components/enhanced_bookmarks:enhanced_bookmarks_java_enums_srcjar", ] DEPRECATED_java_in_dir = "java/src" diff --git a/chrome/android/java/res/color/edit_text_tint.xml b/chrome/android/java/res/color/edit_text_tint.xml deleted file mode 100644 index 228f36b528ec7..0000000000000 --- a/chrome/android/java/res/color/edit_text_tint.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/chrome/android/java/res/values-v21/styles.xml b/chrome/android/java/res/values-v21/styles.xml index 75f28bf5cefa8..70fd01bd863bc 100644 --- a/chrome/android/java/res/values-v21/styles.xml +++ b/chrome/android/java/res/values-v21/styles.xml @@ -8,8 +8,6 @@ -