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

Unified Diff: ui/accelerated_widget_mac/ca_renderer_layer_tree.h

Issue 2391793002: Mac: Fix bugs in Sierra color fix (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: ui/accelerated_widget_mac/ca_renderer_layer_tree.h
diff --git a/ui/accelerated_widget_mac/ca_renderer_layer_tree.h b/ui/accelerated_widget_mac/ca_renderer_layer_tree.h
index cf651ad0d984475c5ee3e5faec1b54c8c459c054..e4724a8f07e28507a520d61bd73f0722d18fc408 100644
--- a/ui/accelerated_widget_mac/ca_renderer_layer_tree.h
+++ b/ui/accelerated_widget_mac/ca_renderer_layer_tree.h
@@ -14,6 +14,7 @@
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_nsobject.h"
+#include "base/memory/ref_counted.h"
#include "ui/accelerated_widget_mac/accelerated_widget_mac_export.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/rect_f.h"
@@ -32,7 +33,8 @@ struct CARendererLayerParams;
// https://docs.google.com/document/d/1DtSN9zzvCF44_FQPM7ie01UxGHagQ66zfF5L9HnigQY/edit?usp=sharing
class ACCELERATED_WIDGET_MAC_EXPORT CARendererLayerTree {
public:
- CARendererLayerTree(bool allow_av_sample_buffer_display_layer);
+ CARendererLayerTree(bool allow_av_sample_buffer_display_layer,
+ bool allow_solid_color_layers);
// This will remove all CALayers from this tree from their superlayer.
~CARendererLayerTree();
@@ -58,7 +60,11 @@ class ACCELERATED_WIDGET_MAC_EXPORT CARendererLayerTree {
bool CommitFullscreenLowPowerLayer(
AVSampleBufferDisplayLayer* fullscreen_low_power_layer);
+ // Returns the contents used for a given solid color.
+ id ContentsForSolidColorForTesting(unsigned int color);
+
private:
+ class SolidColorContents;
struct RootLayer;
struct ClipAndSortingLayer;
struct TransformLayer;
@@ -161,6 +167,7 @@ class ACCELERATED_WIDGET_MAC_EXPORT CARendererLayerTree {
// their use count.
const gfx::ScopedInUseIOSurface io_surface;
const base::ScopedCFTypeRef<CVPixelBufferRef> cv_pixel_buffer;
+ scoped_refptr<SolidColorContents> solid_color_contents;
gfx::RectF contents_rect;
gfx::Rect rect;
unsigned background_color = 0;
@@ -184,6 +191,7 @@ class ACCELERATED_WIDGET_MAC_EXPORT CARendererLayerTree {
float scale_factor_ = 1;
bool has_committed_ = false;
const bool allow_av_sample_buffer_display_layer_ = true;
+ const bool allow_solid_color_layers_ = true;
private:
DISALLOW_COPY_AND_ASSIGN(CARendererLayerTree);
« no previous file with comments | « ui/accelerated_widget_mac/ca_layer_tree_unittest_mac.mm ('k') | ui/accelerated_widget_mac/ca_renderer_layer_tree.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698