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

Side by Side Diff: cc/CCSolidColorLayerImpl.cpp

Issue 10989024: cc: Remove OwnPtr usage from CCRenderPass and CCDrawQuad class hierarchy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/CCSolidColorDrawQuad.cpp ('k') | cc/CCStreamVideoDrawQuad.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 6
7 #if USE(ACCELERATED_COMPOSITING) 7 #if USE(ACCELERATED_COMPOSITING)
8 8
9 #include "CCSolidColorLayerImpl.h" 9 #include "CCSolidColorLayerImpl.h"
10 10
(...skipping 21 matching lines...) Expand all
32 CCSharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createShare dQuadState()); 32 CCSharedQuadState* sharedQuadState = quadSink.useSharedQuadState(createShare dQuadState());
33 appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData); 33 appendDebugBorderQuad(quadSink, sharedQuadState, appendQuadsData);
34 34
35 // We create a series of smaller quads instead of just one large one so that the 35 // We create a series of smaller quads instead of just one large one so that the
36 // culler can reduce the total pixels drawn. 36 // culler can reduce the total pixels drawn.
37 int width = contentBounds().width(); 37 int width = contentBounds().width();
38 int height = contentBounds().height(); 38 int height = contentBounds().height();
39 for (int x = 0; x < width; x += m_tileSize) { 39 for (int x = 0; x < width; x += m_tileSize) {
40 for (int y = 0; y < height; y += m_tileSize) { 40 for (int y = 0; y < height; y += m_tileSize) {
41 IntRect solidTileRect(x, y, min(width - x, m_tileSize), min(height - y, m_tileSize)); 41 IntRect solidTileRect(x, y, min(width - x, m_tileSize), min(height - y, m_tileSize));
42 quadSink.append(CCSolidColorDrawQuad::create(sharedQuadState, solidT ileRect, backgroundColor()), appendQuadsData); 42 quadSink.append(CCSolidColorDrawQuad::create(sharedQuadState, solidT ileRect, backgroundColor()).PassAs<CCDrawQuad>(), appendQuadsData);
43 } 43 }
44 } 44 }
45 } 45 }
46 46
47 const char* CCSolidColorLayerImpl::layerTypeAsString() const 47 const char* CCSolidColorLayerImpl::layerTypeAsString() const
48 { 48 {
49 return "SolidColorLayer"; 49 return "SolidColorLayer";
50 } 50 }
51 51
52 } // namespace cc 52 } // namespace cc
53 #endif // USE(ACCELERATED_COMPOSITING) 53 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « cc/CCSolidColorDrawQuad.cpp ('k') | cc/CCStreamVideoDrawQuad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698