summaryrefslogtreecommitdiffstats
path: root/content/common/cc_messages_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Use factory methods for Skia effects in unit tests.dominikg@chromium.org2014-05-111-1/+1
| | | | | | | | | | | | To avoid stack allocation of Skia effects we made their constructors non-public and provide factory methods instead. This patch updates the remaining uses of the constructors in Chrome. BUG=skia:2187 Review URL: https://codereview.chromium.org/271073002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269653 0039d316-1c4b-4281-b951-d872f2087c98
* Use RenderPass CreateAndAppendSQS whenever possibleweiliangc@chromium.org2014-05-081-53/+49
| | | | | | | | | | | | | | | | | This CL is a follow up on 265823015. Now RenderPass has function to create and append SharedQuadState without passing around the owndership, use this function whenever possible, instead of create SQS and pass it into RenderPass. This CL also helps future CL that will expose the default constructor of SQS, and remove scoped_ptr constructor. BUG=344962 TEST=cc_unittests, content_unittests, content_perftests Review URL: https://codereview.chromium.org/271703003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269013 0039d316-1c4b-4281-b951-d872f2087c98
* Support videos with JPEG color range in GPU YUV convert path.rileya@chromium.org2014-05-031-1/+5
| | | | | | | | | | It's worth noting that the media_browsertests Yuv* tests compare video pixels with a reference image, but whether or not the hardware path is used, copying the pixels from the video into a canvas goes through the software path, so despite looking correct onscreen when GPU-accelerated, the JPEG color range video tests will still fail until the software path properly supports the JPEG color range. BUG=172898 Review URL: https://codereview.chromium.org/92703003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268010 0039d316-1c4b-4281-b951-d872f2087c98
* Use SharedBitmapManager to allocate software frames.jbauman@chromium.org2014-04-091-13/+5
| | | | | | | | | | This reduces the number of ways to allocate cross-process bitmaps. BUG= Review URL: https://codereview.chromium.org/227703009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262620 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Change damage tracking from floats to integers.danakj@chromium.org2014-04-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Damage rects can become huge when layers clip the viewport, and in some cases become so large that we reach inaccurate floating point representation of the whole-number portion, which we fail to handle correctly when doing gfx::ToEnclosingRect. Int/float conversions are also slow, and the GL_SCISSOR wants integers eventually anyway, so keeping track of partial-pixel damage is not buying us much here. So convert the DamageTracker to use integer rects. Also change cc::RenderSurfaceImpl to export a damage_rect that is contained inside the output_rect for the RenderPass, and add DCHECKs to cc::RenderPass to ensure we don't send pointlessly large damage_rects to the cc::Renderer. Tests: DamageTrackerTest.HugeDamageRect R=enne@chromium.org, piman@chromium.org BUG=355514 Review URL: https://codereview.chromium.org/226183007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262160 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb overlay processing into DirectRenderer.alexst@chromium.org2014-03-281-6/+3
| | | | | | | | | | | | | | | | | | | This change tests for overlays inside DirectRenderer::DrawFrame and if new overlay passes were produced, it skips rendering them and forwards the information to FinishDrawingFrame to allow subclasses like GLRenderer and SoftwareRenderer to schedule overlays in a manner specific to their implementation. GLRenderer schedules overlays via ContextSupport. Adds more tests to ensure overlay quads are not drawn and if no overlays are present, no quads are skipped. BUG= Review URL: https://codereview.chromium.org/208213003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260267 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Support texcoord offsets in YUVVideoDrawQuadsheu@chromium.org2014-03-271-2/+2
| | | | | | | | | | | | | | | | YUVVideoDrawQuad currently supports stretching, but not offset, from its source textures. Add support for offset. Also: fix VideoGLRendererPixelTest to upload subsampled chroma planes at the correct (half) size. Use patterned test textures to detect texcoord misalignment. BUG=349450 TEST=local build, run unittests on desktop Linux Review URL: https://codereview.chromium.org/207233002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259831 0039d316-1c4b-4281-b951-d872f2087c98
* Move SoftwareFrameData overflow checks to the IPC code.danakj@chromium.org2014-03-201-0/+79
| | | | | | | | | | | | | | | | | | | Instead of doing this check in SoftwareFrameManager and silently dropping the frame, if we have an overflow, drop the IPC from the renderer (and cause a renderer crash which we can see). Also move computation code for the frame size in bytes to SoftwareFrameData so the computation and the check can be beside each other. Also add unit tests for SoftwareFrameData IPC. R=ccameron@chromium.org, jschuh@chromium.org, piman@chromium.org, ccameron, piman BUG=348332 Review URL: https://codereview.chromium.org/196423027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258418 0039d316-1c4b-4281-b951-d872f2087c98
* Start of hardware overlay support in CC with Ubercompositor.alexst@chromium.org2014-03-201-3/+6
| | | | | | | | | | | | | | | | | | | | | | I'm trying to introduce everything as small unit tested pieces. This adds some machinery for checking if quads inside a render pass could be placed into an overlay. A capability checker is added to the output surface, so that a particular overlay configuration could be validated against a specific display device. If an external monitor is plugged in, its output surface may behave differently that that of the primary on a laptop, for example. The intention is for OverlayCandidates checker to be created as part of BrowserCompositorOutputSurface where the actual hardware knowledge can be delegated to the Ozone platform and the HW specific bits can live there, leaving CC and content platform agnostic. BUG= Review URL: https://codereview.chromium.org/197223003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258209 0039d316-1c4b-4281-b951-d872f2087c98
* Fix (or tag) uses of explicit '64' instead of GL_MAILBOX_SIZE_CHROMIUMpiman@chromium.org2014-02-151-13/+9
| | | | | | | | | | | | | | That way we can easily change the size later. Security says 64 may be overkill. BUG=None Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251306 R=danakj@chromium.org Review URL: https://codereview.chromium.org/138763009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251453 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Fix (or tag) uses of explicit '64' instead of ↵nkostylev@chromium.org2014-02-141-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GL_MAILBOX_SIZE_CHROMIUM (https://codereview.chromium.org/138763009/) Reason for revert: FAILED: c++ -MMD -MF obj/cc/layers/cc_unittests.texture_layer_unittest.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCOMPONENT_BUILD -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_NSS=1 -DUSE_X11=1 -DOS_CHROMEOS=1 -DUSE_XI2_MT=2 -DIMAGE_LOADER_EXTENSION=1 -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_INPUT_SPEECH -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DUSE_UDEV -DENABLE_EGLIMAGE=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_AUTOMATION=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_FULL_PRINTING=1 -DENABLE_PRINTING=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_MANAGED_USERS=1 -DENABLE_MDNS=1 -DGTEST_HAS_POSIX_RE=0 -DGL_GLEXT_PROTOTYPES -DSKIA_DLL -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_ENABLE_INST_COUNT=0 -DSK_SUPPORT_GPU=1 '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' -DSK_ENABLE_LEGACY_API_ALIASING=1 -DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1 -DSK_USE_POSIX_THREADS -DSK_DEFERRED_CANVAS_USES_FACTORIES=1 -DUNIT_TEST -DGTEST_HAS_RTTI=0 -DU_USING_ICU_NAMESPACE=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -I../../cc/test -I../../cc -I../.. -I../../third_party/khronos -I../../gpu -I../../skia/config -I../../third_party/skia/src/core -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../skia/ext -I../../testing/gmock/include -I../../testing/gtest/include -I../../third_party/icu/source/i18n -I../../third_party/icu/source/common -Werror -pthread -fno-exceptions -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -O2 -fno-ident -fdata-sections -ffunction-sections -funwind-tables -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -c ../../cc/layers/texture_layer_unittest.cc -o obj/cc/layers/cc_unittests.texture_layer_unittest.o In file included from ../../testing/gmock/include/gmock/gmock-spec-builders.h:71:0, from ../../testing/gmock/include/gmock/gmock-generated-function-mockers.h:43, from ../../testing/gmock/include/gmock/gmock.h:61, from ../../cc/layers/texture_layer_unittest.cc:33: ../../testing/gmock/include/gmock/gmock-matchers.h: In member function 'bool testing::internal::EqMatcher<Rhs>::Impl<Lhs>::MatchAndExplain(Lhs, testing::MatchResultListener*) const [with Lhs = const gpu::Mailbox&, Rhs = gpu::Mailbox]': ../../cc/layers/texture_layer_unittest.cc:2173:1: instantiated from here ../../testing/gmock/include/gmock/gmock-matchers.h:784:1: error: no match for 'operator==' in 'lhs == ((const testing::internal::EqMatcher<gpu::Mailbox>::Impl<const gpu::Mailbox&>*)this)->testing::internal::EqMatcher<gpu::Mailbox>::Impl<const gpu::Mailbox&>::rhs_' ../../testing/gmock/include/gmock/gmock-matchers.h:784:1: note: candidate is: ../../testing/gtest/include/gtest/internal/gtest-linked_ptr.h:213:6: note: template<class T> bool testing::internal::operator==(T*, const testing::internal::linked_ptr<T>&) ../../testing/gmock/include/gmock/gmock-matchers.h:784:1: error: control reaches end of non-void function [-Werror=return-type] Original issue's description: > Fix (or tag) uses of explicit '64' instead of GL_MAILBOX_SIZE_CHROMIUM > > That way we can easily change the size later. Security says 64 may be overkill. > > BUG=None > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251306 TBR=danakj@chromium.org,piman@chromium.org NOTREECHECKS=true NOTRY=true BUG=None Review URL: https://codereview.chromium.org/166853002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251309 0039d316-1c4b-4281-b951-d872f2087c98
* Fix (or tag) uses of explicit '64' instead of GL_MAILBOX_SIZE_CHROMIUMpiman@chromium.org2014-02-141-13/+9
| | | | | | | | | | That way we can easily change the size later. Security says 64 may be overkill. BUG=None Review URL: https://codereview.chromium.org/138763009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251306 0039d316-1c4b-4281-b951-d872f2087c98
* Add gpu::MailboxHolder to hold state for a gpu::Mailboxsheu@chromium.org2014-02-031-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | gpu::Mailbox by itself can hold only a texture id, but in common usage it comes with texture target and syncpoint information for cross-context sharing. To reduce repetition of this pattern, gpu::MailboxHolder holds: * a gpu::Mailbox * a GL texture target * a syncpoint index Refactor other classes to use a gpu::MailboxHolder instead of separate gpu::Mailbox and associated state. Syncpoints are created with uint32 indices; make sure all uses of syncpoints use the appropriate type. BUG=None TEST=local build, unittests on CrOS snow, desktop Linux TBR=piman@chromium.org, enn@chromium.orge, cevans@chromium.org, scherkus@chromium.org Review URL: https://codereview.chromium.org/132233041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248612 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Add gpu::MailboxHolder to hold state for a gpu::Mailbox"danakj@chromium.org2014-01-211-12/+10
| | | | | | | | | | | | | | | This reverts commit 9ee2343406a6fae9c8aacc7303f7b1e5a04aab9e. This patch is the source of the top crash in canary. See the bug for more details. TBR=sheu NOTREECHECKS=true BUG=336040 Review URL: https://codereview.chromium.org/129873005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245959 0039d316-1c4b-4281-b951-d872f2087c98
* Add gpu::MailboxHolder to hold state for a gpu::Mailboxsheu@chromium.org2014-01-181-10/+12
| | | | | | | | | | | | | | | | | | | | | | gpu::Mailbox by itself can hold only a texture id, but in common usage it comes with texture target and syncpoint information for cross-context sharing. To reduce repetition of this pattern, gpu::MailboxHolder holds: * a gpu::Mailbox * a GL texture target * a syncpoint index Refactor other classes to use a gpu::MailboxHolder instead of separate gpu::Mailbox and associated state. Syncpoints are created with uint32 indices; make sure all uses of syncpoints use uint32. BUG=None TEST=local build, unittests on CrOS snow, desktop Linux Review URL: https://codereview.chromium.org/105743004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245730 0039d316-1c4b-4281-b951-d872f2087c98
* Add cc:DrawQuad type for surfacesjamesr@chromium.org2014-01-171-2/+27
| | | | | | | | | | This quad type just carries a surface ID to be resolved later. A quad of this type will always be replaced by the quads it represents (if any) before being passed to a cc:DirectRenderer for drawing. BUG=334090 Review URL: https://codereview.chromium.org/127373002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245438 0039d316-1c4b-4281-b951-d872f2087c98
* The blink part of this implementation is uploaded at ↵rosca@adobe.com2013-11-261-13/+45
| | | | | | | | | | | | https://codereview.chromium.org/23511004/ The spec for mix-blend-mode is http://dev.w3.org/fxtf/compositing-1/#mix-blend-mode BUG=243223 Review URL: https://codereview.chromium.org/23455060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237295 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Skip unused SharedQuadStates when pickling.danakj@chromium.org2013-11-131-15/+102
| | | | | | | | | | | | | | | | If we cull DrawQuads from the scene, we can be left with SharedQuadStates that no DrawQuads are left actually using. It's a waste of time/space to serialize these, so just skip them. Tests: CCMessagesTest.UnusedSharedQuadStates BUG=311672 R=piman Review URL: https://codereview.chromium.org/56153004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234800 0039d316-1c4b-4281-b951-d872f2087c98
* Revert https://src.chromium.org/viewvc/chrome?view=rev&revision=231330bbudge@chromium.org2013-11-041-2/+2
| | | | | | | | | | This is a speculative revert to see if it's the cause of hanging renderers. BUG=313112 Review URL: https://codereview.chromium.org/57783006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232819 0039d316-1c4b-4281-b951-d872f2087c98
* Removing the allow-filters-over-ipc flagsugoi@chromium.org2013-11-021-6/+0
| | | | | | | | BUG= Review URL: https://codereview.chromium.org/54653003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232568 0039d316-1c4b-4281-b951-d872f2087c98
* IPC pickling optimization for render passes.danakj@chromium.org2013-10-291-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call Pickle::Reserve() for the size of the data in the shared quad state and quad lists. This prevents the WriteFoo() invocations for all of the quad/shared quad states from causing memory re-allocations and moves. This is based on https://codereview.chromium.org/34413002/ from piman@. This is also based after https://codereview.chromium.org/30593005/ and perf numbers (both before and after) include that CL also. content_perftest results on linux chromeos release official build: BEFORE *RESULT mean_frame_serialization_time: DelegatedFrame_ManyQuads_1_4000= 50 us *RESULT mean_frame_serialization_time: DelegatedFrame_ManyQuads_1_100000= 1888 us *RESULT mean_frame_serialization_time: DelegatedFrame_ManyQuads_4000_4000= 728 us *RESULT mean_frame_serialization_time: DelegatedFrame_ManyQuads_100000_100000= 23771 us *RESULT mean_frame_serialization_time: DelegatedFrame_ManyRenderPasses_10000_100= 24118 us AFTER *RESULT mean_frame_serialization_time: DelegatedFrame_ManyQuads_1_4000= 48 us *RESULT mean_frame_serialization_time: DelegatedFrame_ManyQuads_1_100000= 1626 us *RESULT mean_frame_serialization_time: DelegatedFrame_ManyQuads_4000_4000= 460 us *RESULT mean_frame_serialization_time: DelegatedFrame_ManyQuads_100000_100000= 14771 us *RESULT mean_frame_serialization_time: DelegatedFrame_ManyRenderPasses_10000_100= 15626 us This gives a further ~1.5x improvement in serialization time for shared quad states and render passes. R=jar@chromium.org, piman@chromium.org, tsepez@chromium.org, piman BUG=307480 Review URL: https://codereview.chromium.org/35893002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231656 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused IPC::Message priority.bbudge@chromium.org2013-10-281-2/+2
| | | | | | | | | | | | | | | | | Removes the PriorityValue enum and field from IPC::Message. This doesn't appear to be used anywhere. Changes the data message ctor to take a size_t data_len parameter. This works around an ambiguity problem with the main ctor, which has a similar signature and would require lots of futzing with our test code to fix. To make this work, the matching Pickle constructor is also changed to take a size_t data_len parameter. BUG=194304 Review URL: https://codereview.chromium.org/35643005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231330 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Preserve partial culling from child compositor.danakj@chromium.org2013-10-121-18/+24
| | | | | | | | | | | | | | | | | | | When the child compositor performs occlusion culling and determines what part of the quad is visible, we should preserve this in the browser compositor, and only shrink the visible (unoccluded) rect on quads if we're able due to occlusion in the browser. We should not grow the visible rect ever. Tests: QuadCullerTest.PartialCullingNotDestroyed QuadCullerTest.PartialCullingWithOcclusionNotDestroyed R=alokp@chromium.org, piman BUG=305757 Review URL: https://codereview.chromium.org/26726003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228350 0039d316-1c4b-4281-b951-d872f2087c98
* aura: Don't allow empty delegated frames.danakj@chromium.org2013-10-031-0/+5
| | | | | | | | | | | | | Drop them in the IPC layer. And DCHECK in RenderWidgetHostViewAura that frames have at last one render pass. Renderer will always produce frames with a render pass. R=piman BUG=263069 Review URL: https://codereview.chromium.org/25624002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226671 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Delete RenderSurface caching.alokp@chromium.org2013-10-011-6/+2
| | | | | | | | | | | | | RenderSurface caching has been disabled for some time and getting in the way of optimizing OcclusionTracker. The proposed optimization cannot distinguish between inside and outside occlusion, which is needed by surface caching. The proposed optimization for OcclusionTracker is here: https://codereview.chromium.org/23708021/ BUG=276725 Review URL: https://codereview.chromium.org/23792012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226146 0039d316-1c4b-4281-b951-d872f2087c98
* Support GL_TEXTURE_EXTERNAL_OES targets through the compositorsheu@chromium.org2013-09-261-2/+6
| | | | | | | | | | | | Will be useful later for video compositing (i.e. hardware decoders that produces raw YUV frames). BUG=167417 TEST=local build, unittests, run on CrOS snow Review URL: https://codereview.chromium.org/23950010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225350 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for converting cc::FilterOperations into an SkImageFilterajuma@chromium.org2013-09-261-9/+14
| | | | | | | | | | | | | | | | | This defines a new type of cc::FilterOperation for reference filters, and defines a method (RenderSurfaceFilters::BuildImageFilter) that builds an SkImageFilter from a given cc::FilterOperations. This also removes cc::Layer::SetFilter and cc::LayerImpl::SetFilter. These were only used when we had a reference filter, but they are no longer needed now that reference filters can be included in FilterOperations. BUG=181613 Review URL: https://codereview.chromium.org/21154002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225329 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Reland r233830. "Adding support for RGBA_4444 tile textures". r223830 ↵kaanb@chromium.org2013-09-191-2/+2
| | | | | | | | | | had a bug in async_pixel_transfer_manager_egl.cc that wasn't directly related to the 4444 support. This patch includes the rest of the files in r223830. Changes to async_pixel_transfer_manager_egl.cc have been moved to the separate patch after fixing the bug: https://codereview.chromium.org/23533067/ BUG=272539 Review URL: https://chromiumcodereview.appspot.com/23447048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224040 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Adding support for RGBA_4444 tile textures"tomhudson@google.com2013-09-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8e6d15826280b9f11a28060b5b2d2bbef17d15bc (r223830; http://crrev.com/21159007). Although the 4444 textures work on S4, they break on N7v2 and N10. (We've got inconsistent reports about N4.) Passing --disable-4444-textures isn't sufficient to fix the problems. ilevy@ points out that the commit bot is using GN, so could easily have missed this breakage. We're hoping to switch to N4, but in this case there's no guarantee that that would have caught it either. Perhaps the main patch can be landed in pieces next time? From N7: E/chromium(32513): [ERROR:gles2_cmd_decoder.cc(5770)] [.RenderCompositor-0x783c9880]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete' From N10: I/chromium( 2104): [INFO:CONSOLE(0)] "[.WebGLRenderingContext]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete'", source: file:///sdcard/clanktemp/index.html (0) R=skyostil@chromium.org TBR=kaanb@chromium.org BUG=245774,272539 Review URL: https://codereview.chromium.org/24219002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223871 0039d316-1c4b-4281-b951-d872f2087c98
* Adding support for RGBA_4444 tile textureskaanb@chromium.org2013-09-181-2/+2
| | | | | | | | BUG=245774,272539 Review URL: https://chromiumcodereview.appspot.com/21159007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223830 0039d316-1c4b-4281-b951-d872f2087c98
* Added SkImageFilter serializationsugoi@chromium.org2013-08-121-4/+15
| | | | | | | | BUG=164084 Review URL: https://chromiumcodereview.appspot.com/21271002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217117 0039d316-1c4b-4281-b951-d872f2087c98
* Blend TextureLayer background-color at draw time.alokp@chromium.org2013-07-121-0/+2
| | | | | | | | | | | | | | | | | This enables the following optimization: 1. The compositor will be able to disable GL blending if the background-color is opaque. 2. For elements that paint directly to a texture layer, i.e. accelerated canvas, video, etc., there is no need to allocate an additional layer just to paint the background. BUG=236982 Review URL: https://chromiumcodereview.appspot.com/18432002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211339 0039d316-1c4b-4281-b951-d872f2087c98
* Move implementation of WebFilterOperations into ccajuma@chromium.org2013-06-251-6/+6
| | | | | | | | | | | | | | | | This moves the implementation of WebFilterOperations into cc, and (behind an #ifdef) defines a WebFilterOperationsImpl class that implements the WebFilterOperations interface by wrapping a cc::FilterOperations. With this change, cc and ui/compositor no longer need to include WebFilterOperations.h. BUG=181613 Review URL: https://chromiumcodereview.appspot.com/16968002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208531 0039d316-1c4b-4281-b951-d872f2087c98
* Adding YUVA support for enabling Alpha Playbackvigneshv@chromium.org2013-06-071-1/+4
| | | | | | | | | | | | | | Adding YUVA support for enabling VP8 Alpha Playback. Trying to reland the change that was reverted earlier. Old CL: https://codereview.chromium.org/12157002/ BUG=147355 TBR=jschuh@chromium.org Review URL: https://chromiumcodereview.appspot.com/16580006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204944 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 204508 "Adding YUVA support for enabling Alpha Playback"dalecurtis@google.com2013-06-061-4/+1
| | | | | | | | | | | | | | | | | | > Adding YUVA support for enabling Alpha Playback > > BUG=147355 > > Review URL: https://chromiumcodereview.appspot.com/12157002 Failing linux_asan with SEGV and heap buffer overflow errors: http://build.chromium.org/p/chromium.memory/builders/Linux%20ASAN%20Tests%20%283%29/builds/9750 TBR=vigneshv@chromium.org Review URL: https://codereview.chromium.org/16564004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204518 0039d316-1c4b-4281-b951-d872f2087c98
* Adding YUVA support for enabling Alpha Playbackvigneshv@chromium.org2013-06-061-1/+4
| | | | | | | | BUG=147355 Review URL: https://chromiumcodereview.appspot.com/12157002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204508 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Add force anti-aliasing off option to SolidColorDrawQuadwonsik@chromium.org2013-05-021-2/+4
| | | | | | | | | | | | | | When edge anti-aliasing is used, GL renderer forces blending to be used, which causes hole punching logic to misbehave. Make force anti-aliasing off option to SolidColorDrawQuad to avoid unwanted anti-aliasing. TEST=cc_unittests ; content_unittests BUG=236317 R=enne@chromium.org,danakj@chromium.org,jamesr@chromium.org Review URL: https://chromiumcodereview.appspot.com/13842037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197931 0039d316-1c4b-4281-b951-d872f2087c98
* Fix RenderPassDrawQuad serializationpiman@chromium.org2013-04-171-0/+1
| | | | | | | | BUG=None Review URL: https://codereview.chromium.org/14178005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194692 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Move video upload to VideoResourceUpdater.danakj@chromium.org2013-04-101-35/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VideoLayerImpl currently does upload of video frames from media::VideoFrame to hardware/software resources, and displays these resources through quads. This code is unfriendly to ubercomp as it requires holding onto the hardware resources when using hardware decode, and because it reuses the same textures every frame even though they need to be sent to the parent compositor. This CL introduces the VideoResourceUpdater class, and moves all logic around media::VideoFrame to that class. The VideoResourceUpdater class takes as input a VideoFrame, and produces a set of TextureMailboxes for the video layer to consume. In the software case, the VideoResourceUpdater sets itself up as the release callback so it can delete the backing texture when the browser compositor is done with it (it could recycle it in the future). In the hardware case, the VideoResourceUpdater takes a callback as input, so it can have the WebMediaPlayer notified when the texture is given back from the browser, and the hardware decoder can use it again for writing. This CL also prepares us better for software uber-compositing video. The video layer deals now only with abstract "resources", except for the mailboxes for ubercompositor. The TextureMailbox construct needs to be abstracted in order to hold a hardware or software backing for ubercompositor. Then the video layer's special-case code for software can be entirely removed and it will be fully software-uber-compositor-ready. Currently, the VideoLayerImpl just makes use of the VideoResourceUpdater class, making this a refactor without any functional change. This will make video playback in ubercompositor work correctly for software-decoded video. In order to address hardware-decoded video, a followup CL will have the WebMediaPlayer hook up a callback through the VideoResourceUpdater to ensure it doesn't reuse a texture for decode until it is returned from the parent compositor. R=enne,jamesr BUG=179729 Review URL: https://chromiumcodereview.appspot.com/13445009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193323 0039d316-1c4b-4281-b951-d872f2087c98
* Implement on demand quad rasterization for PicturePiles.leandrogracia@chromium.org2013-03-271-0/+5
| | | | | | | | | BUG=173011 Review URL: https://chromiumcodereview.appspot.com/12642010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190969 0039d316-1c4b-4281-b951-d872f2087c98
* Part 4 of cc/ directory shuffles: outputjamesr@chromium.org2013-03-181-1/+1
| | | | | | | | | | | Continuation of https://src.chromium.org/viewvc/chrome?view=rev&revision=188681 BUG=190824 TBR=piman@chromium.org, jschuh@chromium.org Review URL: https://codereview.chromium.org/12912006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188689 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Chromify the VideoLayerImpl classes.danakj@chromium.org2013-03-151-6/+6
| | | | | | | | | | | | | | Style-only change. Put VideoLayerImpl and its support classes into chromium style. R=enne,piman BUG= Review URL: https://chromiumcodereview.appspot.com/12453015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188489 0039d316-1c4b-4281-b951-d872f2087c98
* Move Mailbox from cc to gpu, and its traits to gpu/ipcpiman@chromium.org2013-03-041-2/+2
| | | | | | | | | | | | | | | | Mailbox is safer to IPC than coaxing it into a string, because otherwise we need to validate the size when coming from untrusted sources. This is to enable passing Mailbox through IPC without having to depend on cc. Among others I will need it to move Pepper to mailboxes, and pepper can't depend on cc. BUG=164095 Review URL: https://chromiumcodereview.appspot.com/12378053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186006 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Moving anti-aliasing decision to parent compositor.ernstm@chromium.org2013-03-041-12/+5
| | | | | | | | | | | | | Changed edge antialiasing flags in TileDrawQuad to edge flags and moved to SharedQuadState. The quad cannot tell anymore if it needs antialiasing or not. The renderer will make that decision. Moved blending decision from GLRenderer::drawQuad to GLRenderer::draw*Quad functions. BUG=169163 Review URL: https://chromiumcodereview.appspot.com/12328098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185934 0039d316-1c4b-4281-b951-d872f2087c98
* Fix TransferableResource::filter serialization that was left out when filter ↵piman@chromium.org2013-02-281-0/+3
| | | | | | | | | | | | | | got added. This also adds tests to make sure the filter info is properly taken into account across resource providers. BUG=146080 Review URL: https://chromiumcodereview.appspot.com/12342048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185106 0039d316-1c4b-4281-b951-d872f2087c98
* Move sync point from TransferResourceList to individual TransferResourcespiman@chromium.org2013-02-271-9/+10
| | | | | | | | | | | | | This allows better granularity for sync points, and saves waits for the mailbox-created resources. It also allows the ÜC patch to drop the problematic TransferResourceList::Merge BUG=146080 Review URL: https://chromiumcodereview.appspot.com/12335088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184861 0039d316-1c4b-4281-b951-d872f2087c98
* cc: The DelegatedFrameData::size field is redundant.danakj@chromium.org2013-02-231-6/+0
| | | | | | | | | | | | This data is already stored in the root render pass's output_rect. R=piman BUG=123444 Review URL: https://chromiumcodereview.appspot.com/12335046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184247 0039d316-1c4b-4281-b951-d872f2087c98
* Fix TextureDrawQuad serialization, ensure all quad types are testedpiman@chromium.org2013-01-301-6/+53
| | | | | | | | | BUG=None Review URL: https://chromiumcodereview.appspot.com/12092010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179518 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Stop using drawableContentRect for occlusion.danakj@chromium.org2013-01-221-4/+0
| | | | | | | | | | | | | | | | | | | | | | The occlusion tracker has been using the drawableContentRect() which is not useful compared to the clipRect() unless queries go outside the bounds of the layer (which they would not). Also, the tests would override and fake out the layer drawableContentRect() instead of just making a clipRect() with an appropriate tree hierarchy. The unit tests are now more real, and set up clipping in legitimite ways, and drawableContentRect() is no longer used. This removes most of the usage of the drawableContentRect() outside of tests, making it easier to remove it entirely in the future if we like. Tested by all the occlusion tracker unit tests in cc_unittests. TBR=cdn@chromium.org Review URL: https://chromiumcodereview.appspot.com/11871008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177974 0039d316-1c4b-4281-b951-d872f2087c98
* Putting back: Add point-based UV coordinate on TextureLayerjscholler@chromium.org2013-01-181-1/+2
| | | | | | | | | | | | | | Revert "Revert 177288" TBR=ilevy@chromium.org This reverts commit 3543975945a5667aa3fb48c6d0e1b6312d1ed293. BUG=168927 Review URL: https://chromiumcodereview.appspot.com/11902005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177541 0039d316-1c4b-4281-b951-d872f2087c98