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

Unified Diff: cc/layers/surface_layer.h

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/solid_color_layer_impl_unittest.cc ('k') | cc/layers/surface_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/surface_layer.h
diff --git a/cc/layers/surface_layer.h b/cc/layers/surface_layer.h
index 429254967052d774fd4ec1ba30a76f60abdddfe4..9b7358965b10e81865bf2de4a40f05773ea27160 100644
--- a/cc/layers/surface_layer.h
+++ b/cc/layers/surface_layer.h
@@ -9,6 +9,7 @@
#include "cc/layers/layer.h"
#include "cc/surfaces/surface_id.h"
#include "cc/surfaces/surface_sequence.h"
+#include "ui/gfx/size.h"
namespace cc {
@@ -29,12 +30,16 @@ class CC_EXPORT SurfaceLayer : public Layer {
const SatisfyCallback& satisfy_callback,
const RequireCallback& require_callback);
- void SetSurfaceId(SurfaceId surface_id);
+ void SetSurfaceId(SurfaceId surface_id, float scale, const gfx::Size& size);
// Layer overrides.
scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
void SetLayerTreeHost(LayerTreeHost* host) override;
void PushPropertiesTo(LayerImpl* layer) override;
+ void CalculateContentsScale(float ideal_contents_scale,
+ float* contents_scale_x,
+ float* contents_scale_y,
+ gfx::Size* content_bounds) override;
protected:
SurfaceLayer(const SatisfyCallback& satisfy_callback,
@@ -47,6 +52,8 @@ class CC_EXPORT SurfaceLayer : public Layer {
void SatisfyDestroySequence();
SurfaceId surface_id_;
+ gfx::Size surface_size_;
+ float surface_scale_;
SurfaceSequence destroy_sequence_;
SatisfyCallback satisfy_callback_;
RequireCallback require_callback_;
« no previous file with comments | « cc/layers/solid_color_layer_impl_unittest.cc ('k') | cc/layers/surface_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698