Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: Source/platform/graphics/GraphicsLayer.cpp

Issue 474683003: Not for review - Rebase of crrev.com/62833003 Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/platform/graphics/GraphicsLayer.h ('k') | Source/web/ChromeClientImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 30 matching lines...) Expand all
41 #include "public/platform/Platform.h" 41 #include "public/platform/Platform.h"
42 #include "public/platform/WebCompositorAnimation.h" 42 #include "public/platform/WebCompositorAnimation.h"
43 #include "public/platform/WebCompositorSupport.h" 43 #include "public/platform/WebCompositorSupport.h"
44 #include "public/platform/WebFilterOperations.h" 44 #include "public/platform/WebFilterOperations.h"
45 #include "public/platform/WebFloatPoint.h" 45 #include "public/platform/WebFloatPoint.h"
46 #include "public/platform/WebFloatRect.h" 46 #include "public/platform/WebFloatRect.h"
47 #include "public/platform/WebGraphicsLayerDebugInfo.h" 47 #include "public/platform/WebGraphicsLayerDebugInfo.h"
48 #include "public/platform/WebLayer.h" 48 #include "public/platform/WebLayer.h"
49 #include "public/platform/WebPoint.h" 49 #include "public/platform/WebPoint.h"
50 #include "public/platform/WebSize.h" 50 #include "public/platform/WebSize.h"
51 #include "public/platform/WebString.h"
51 #include "wtf/CurrentTime.h" 52 #include "wtf/CurrentTime.h"
52 #include "wtf/HashMap.h" 53 #include "wtf/HashMap.h"
53 #include "wtf/HashSet.h" 54 #include "wtf/HashSet.h"
54 #include "wtf/text/WTFString.h" 55 #include "wtf/text/WTFString.h"
55 56
56 #include <algorithm> 57 #include <algorithm>
57 58
58 #ifndef NDEBUG 59 #ifndef NDEBUG
59 #include <stdio.h> 60 #include <stdio.h>
60 #endif 61 #endif
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 m_ninePatchLayer->setBitmap(bitmap); 958 m_ninePatchLayer->setBitmap(bitmap);
958 m_ninePatchLayer->setAperture(aperture); 959 m_ninePatchLayer->setAperture(aperture);
959 m_ninePatchLayer->setBorder(border); 960 m_ninePatchLayer->setBorder(border);
960 961
961 m_ninePatchLayer->layer()->setOpaque(image->currentFrameKnownToBeOpaque( )); 962 m_ninePatchLayer->layer()->setOpaque(image->currentFrameKnownToBeOpaque( ));
962 registerContentsLayer(m_ninePatchLayer->layer()); 963 registerContentsLayer(m_ninePatchLayer->layer());
963 } 964 }
964 setContentsTo(m_ninePatchLayer ? m_ninePatchLayer->layer() : 0); 965 setContentsTo(m_ninePatchLayer ? m_ninePatchLayer->layer() : 0);
965 } 966 }
966 967
968 void GraphicsLayer::addAnimatedProperty(const String& propertyName)
969 {
970 platformLayer()->addAnimatedProperty(WebString(propertyName));
971 }
972
973 void GraphicsLayer::clearAnimatedProperties()
974 {
975 platformLayer()->clearAnimatedProperties();
976 }
977
967 bool GraphicsLayer::addAnimation(PassOwnPtr<WebCompositorAnimation> popAnimation ) 978 bool GraphicsLayer::addAnimation(PassOwnPtr<WebCompositorAnimation> popAnimation )
968 { 979 {
969 OwnPtr<WebCompositorAnimation> animation(popAnimation); 980 OwnPtr<WebCompositorAnimation> animation(popAnimation);
970 ASSERT(animation); 981 ASSERT(animation);
971 platformLayer()->setAnimationDelegate(this); 982 platformLayer()->setAnimationDelegate(this);
972 983
973 // Remove any existing animations with the same animation id and target prop erty. 984 // Remove any existing animations with the same animation id and target prop erty.
974 platformLayer()->removeAnimation(animation->id(), animation->targetProperty( )); 985 platformLayer()->removeAnimation(animation->id(), animation->targetProperty( ));
975 return platformLayer()->addAnimation(animation.leakPtr()); 986 return platformLayer()->addAnimation(animation.leakPtr());
976 } 987 }
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 #ifndef NDEBUG 1078 #ifndef NDEBUG
1068 void showGraphicsLayerTree(const blink::GraphicsLayer* layer) 1079 void showGraphicsLayerTree(const blink::GraphicsLayer* layer)
1069 { 1080 {
1070 if (!layer) 1081 if (!layer)
1071 return; 1082 return;
1072 1083
1073 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo); 1084 String output = layer->layerTreeAsText(blink::LayerTreeIncludesDebugInfo);
1074 fprintf(stderr, "%s\n", output.utf8().data()); 1085 fprintf(stderr, "%s\n", output.utf8().data());
1075 } 1086 }
1076 #endif 1087 #endif
OLDNEW
« no previous file with comments | « Source/platform/graphics/GraphicsLayer.h ('k') | Source/web/ChromeClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698