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

Side by Side Diff: webkit/renderer/compositor_bindings/web_content_layer_impl.cc

Issue 19925003: WIP - command line experiment Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/renderer/compositor_bindings/web_content_layer_impl.h" 5 #include "webkit/renderer/compositor_bindings/web_content_layer_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/base/switches.h" 8 #include "cc/base/switches.h"
9 #include "cc/base/util.h"
9 #include "cc/layers/content_layer.h" 10 #include "cc/layers/content_layer.h"
10 #include "cc/layers/picture_layer.h" 11 #include "cc/layers/picture_layer.h"
11 #include "third_party/WebKit/public/platform/WebContentLayerClient.h" 12 #include "third_party/WebKit/public/platform/WebContentLayerClient.h"
12 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 13 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
13 #include "third_party/WebKit/public/platform/WebFloatRect.h" 14 #include "third_party/WebKit/public/platform/WebFloatRect.h"
14 #include "third_party/WebKit/public/platform/WebRect.h" 15 #include "third_party/WebKit/public/platform/WebRect.h"
15 #include "third_party/WebKit/public/platform/WebSize.h" 16 #include "third_party/WebKit/public/platform/WebSize.h"
16 #include "third_party/skia/include/utils/SkMatrix44.h" 17 #include "third_party/skia/include/utils/SkMatrix44.h"
17 18
18 using cc::ContentLayer; 19 using cc::ContentLayer;
19 using cc::PictureLayer; 20 using cc::PictureLayer;
20 21
21 namespace webkit { 22 namespace webkit {
22 23
23 static bool usingPictureLayer() { 24 static bool usingPictureLayer() {
24 return cc::switches::IsImplSidePaintingEnabled(); 25 return cc::IsImplSidePaintingEnabled();
25 } 26 }
26 27
27 WebContentLayerImpl::WebContentLayerImpl(WebKit::WebContentLayerClient* client) 28 WebContentLayerImpl::WebContentLayerImpl(WebKit::WebContentLayerClient* client)
28 : client_(client), 29 : client_(client),
29 ignore_lcd_text_change_(false) { 30 ignore_lcd_text_change_(false) {
30 if (usingPictureLayer()) 31 if (usingPictureLayer())
31 layer_ = make_scoped_ptr(new WebLayerImpl(PictureLayer::Create(this))); 32 layer_ = make_scoped_ptr(new WebLayerImpl(PictureLayer::Create(this)));
32 else 33 else
33 layer_ = make_scoped_ptr(new WebLayerImpl(ContentLayer::Create(this))); 34 layer_ = make_scoped_ptr(new WebLayerImpl(ContentLayer::Create(this)));
34 layer_->layer()->SetIsDrawable(true); 35 layer_->layer()->SetIsDrawable(true);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // LCD text cannot be enabled once disabled. 76 // LCD text cannot be enabled once disabled.
76 if (layer_->layer()->can_use_lcd_text() && ignore_lcd_text_change_) 77 if (layer_->layer()->can_use_lcd_text() && ignore_lcd_text_change_)
77 return; 78 return;
78 79
79 can_use_lcd_text_ = layer_->layer()->can_use_lcd_text(); 80 can_use_lcd_text_ = layer_->layer()->can_use_lcd_text();
80 ignore_lcd_text_change_ = true; 81 ignore_lcd_text_change_ = true;
81 layer_->invalidate(); 82 layer_->invalidate();
82 } 83 }
83 84
84 } // namespace webkit 85 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/plugin_switches.h ('k') | webkit/renderer/compositor_bindings/web_image_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698