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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/GraphicsLayer.h

Issue 2410513002: Plumb preferred raster scale for background images from Blink to cc layers. (Closed)
Patch Set: none Created 4 years, 2 months 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. 3 * Copyright (C) 2013 Intel Corporation. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 ContentLayerDelegate* contentLayerDelegateForTesting() const { 271 ContentLayerDelegate* contentLayerDelegateForTesting() const {
272 return m_contentLayerDelegate.get(); 272 return m_contentLayerDelegate.get();
273 } 273 }
274 274
275 // DisplayItemClient methods 275 // DisplayItemClient methods
276 String debugName() const final { return m_client->debugName(this); } 276 String debugName() const final { return m_client->debugName(this); }
277 LayoutRect visualRect() const override; 277 LayoutRect visualRect() const override;
278 278
279 void setHasWillChangeTransformHint(bool); 279 void setHasWillChangeTransformHint(bool);
280 280
281 void setPreferredRasterScale(float);
282 void clearPreferredRasterScale();
283
281 protected: 284 protected:
282 String debugName(cc::Layer*) const; 285 String debugName(cc::Layer*) const;
283 bool shouldFlattenTransform() const { return m_shouldFlattenTransform; } 286 bool shouldFlattenTransform() const { return m_shouldFlattenTransform; }
284 287
285 explicit GraphicsLayer(GraphicsLayerClient*); 288 explicit GraphicsLayer(GraphicsLayerClient*);
286 // for testing 289 // for testing
287 friend class CompositedLayerMappingTest; 290 friend class CompositedLayerMappingTest;
288 friend class PaintControllerPaintTestBase; 291 friend class PaintControllerPaintTestBase;
289 292
290 private: 293 private:
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 391
389 std::unique_ptr<ContentLayerDelegate> m_contentLayerDelegate; 392 std::unique_ptr<ContentLayerDelegate> m_contentLayerDelegate;
390 393
391 WeakPersistent<ScrollableArea> m_scrollableArea; 394 WeakPersistent<ScrollableArea> m_scrollableArea;
392 GraphicsLayerDebugInfo m_debugInfo; 395 GraphicsLayerDebugInfo m_debugInfo;
393 int m_renderingContext3d; 396 int m_renderingContext3d;
394 397
395 std::unique_ptr<PaintController> m_paintController; 398 std::unique_ptr<PaintController> m_paintController;
396 399
397 IntRect m_previousInterestRect; 400 IntRect m_previousInterestRect;
401 float m_preferredRasterScale;
402 bool m_hasPreferredRasterScale;
398 }; 403 };
399 404
400 } // namespace blink 405 } // namespace blink
401 406
402 #ifndef NDEBUG 407 #ifndef NDEBUG
403 // Outside the blink namespace for ease of invocation from gdb. 408 // Outside the blink namespace for ease of invocation from gdb.
404 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); 409 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*);
405 #endif 410 #endif
406 411
407 #endif // GraphicsLayer_h 412 #endif // GraphicsLayer_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698