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

Side by Side Diff: cc/layers/picture_layer_impl.cc

Issue 16211002: Skip drawing unsupported layers in forced software mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on r203584 Created 7 years, 6 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "cc/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/base/math_util.h" 10 #include "cc/base/math_util.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 gfx::Rect rect(visible_content_rect()); 110 gfx::Rect rect(visible_content_rect());
111 gfx::Rect content_rect(content_bounds()); 111 gfx::Rect content_rect(content_bounds());
112 112
113 SharedQuadState* shared_quad_state = 113 SharedQuadState* shared_quad_state =
114 quad_sink->UseSharedQuadState(CreateSharedQuadState()); 114 quad_sink->UseSharedQuadState(CreateSharedQuadState());
115 115
116 bool draw_direct_to_backbuffer = 116 bool draw_direct_to_backbuffer =
117 draw_properties().can_draw_directly_to_backbuffer && 117 draw_properties().can_draw_directly_to_backbuffer &&
118 layer_tree_impl()->settings().force_direct_layer_drawing; 118 layer_tree_impl()->settings().force_direct_layer_drawing;
119 119
120 if (draw_direct_to_backbuffer || !append_quads_data->allow_tile_draw_quads) { 120 if (draw_direct_to_backbuffer ||
121 current_draw_mode_ == DRAW_MODE_RESOURCELESS_SOFTWARE) {
121 AppendDebugBorderQuad( 122 AppendDebugBorderQuad(
122 quad_sink, 123 quad_sink,
123 shared_quad_state, 124 shared_quad_state,
124 append_quads_data, 125 append_quads_data,
125 DebugColors::DirectPictureBorderColor(), 126 DebugColors::DirectPictureBorderColor(),
126 DebugColors::DirectPictureBorderWidth(layer_tree_impl())); 127 DebugColors::DirectPictureBorderWidth(layer_tree_impl()));
127 128
128 gfx::Rect geometry_rect = rect; 129 gfx::Rect geometry_rect = rect;
129 gfx::Rect opaque_rect = contents_opaque() ? geometry_rect : gfx::Rect(); 130 gfx::Rect opaque_rect = contents_opaque() ? geometry_rect : gfx::Rect();
130 gfx::Size texture_size = rect.size(); 131 gfx::Size texture_size = rect.size();
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 state->Set("tilings", tilings_->AsValue().release()); 1025 state->Set("tilings", tilings_->AsValue().release());
1025 state->Set("pictures", pile_->AsValue().release()); 1026 state->Set("pictures", pile_->AsValue().release());
1026 state->Set("invalidation", invalidation_.AsValue().release()); 1027 state->Set("invalidation", invalidation_.AsValue().release());
1027 } 1028 }
1028 1029
1029 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const { 1030 size_t PictureLayerImpl::GPUMemoryUsageInBytes() const {
1030 return tilings_->GPUMemoryUsageInBytes(); 1031 return tilings_->GPUMemoryUsageInBytes();
1031 } 1032 }
1032 1033
1033 } // namespace cc 1034 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698